void CActorInstance::__HitGood(CActorInstance& rVictim) { if (rVictim.IsKnockDown()) return; if (rVictim.IsStun()) { rVictim.Die(); } else { rVictim.__Shake(100); if (!rVictim.isLock()) { float fRotRad = D3DXToRadian(GetRotation()); float fVictimRotRad = D3DXToRadian(rVictim.GetRotation()); D3DXVECTOR2 v2Normal(sin(fRotRad), cos(fRotRad)); D3DXVECTOR2 v2VictimNormal(sin(fVictimRotRad), cos(fVictimRotRad)); D3DXVec2Normalize(&v2Normal, &v2Normal); D3DXVec2Normalize(&v2VictimNormal, &v2VictimNormal); float fScalar = D3DXVec2Dot(&v2Normal, &v2VictimNormal); if (fScalar < 0.0f) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } else { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_BACK)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); else if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE)) rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } } }
void CActorInstance::__HitGreate(CActorInstance& rVictim) { // DISABLE_KNOCKDOWN_ATTACK if (rVictim.IsKnockDown()) return; if (rVictim.__IsStandUpMotion()) return; // END_OF_DISABLE_KNOCKDOWN_ATTACK float fRotRad = D3DXToRadian(GetRotation()); float fVictimRotRad = D3DXToRadian(rVictim.GetRotation()); D3DXVECTOR2 v2Normal(sin(fRotRad), cos(fRotRad)); D3DXVECTOR2 v2VictimNormal(sin(fVictimRotRad), cos(fVictimRotRad)); D3DXVec2Normalize(&v2Normal, &v2Normal); D3DXVec2Normalize(&v2VictimNormal, &v2VictimNormal); float fScalar = D3DXVec2Dot(&v2Normal, &v2VictimNormal); rVictim.__Shake(100); if (rVictim.IsUsingSkill()) return; if (rVictim.IsStun()) { if (fScalar < 0.0f) rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); else { if (!rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING_BACK)) rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING); } rVictim.m_isRealDead=true; } else { if (fScalar < 0.0f) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING)) { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } else { if (!rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING_BACK)) { if (rVictim.InterceptOnceMotion(CRaceMotionData::NAME_DAMAGE_FLYING)) { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } else { rVictim.PushOnceMotion(CRaceMotionData::NAME_STAND_UP_BACK); rVictim.PushLoopMotion(CRaceMotionData::NAME_WAIT); } } } }