void CActorInstance::__HitStone(CActorInstance& rVictim) { if (rVictim.IsStun()) { rVictim.Die(); } else { rVictim.__Shake(100); } }
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); } } } }