void CClientMeleeCollisionController::HandleCollision(HOBJECT hTarget, HMODELNODE hNodeHit, EPhysicsGroup eHitPhysics, const LTVector& vPos, const LTVector& vDir) { // Check if the attack has been blocked via rigidbody... if (eHitPhysics == PhysicsUtilities::ePhysicsGroup_UserBlockMelee) { HandleBlocked(hTarget, vPos, vDir); return; } // Check if the attack has been blocked via forced blocking (what the AI does)... CCharacterFX* pTargetFX = g_pGameClientShell->GetSFXMgr()->GetCharacterFX(hTarget); if (pTargetFX && pTargetFX->IsBlocking()) { HandleBlocked(hTarget, vPos, vDir); return; } // Handle normal damage... CAutoMessage cMsg; cMsg.Writeuint8(MID_OBJECT_MESSAGE); cMsg.WriteObject(m_hObject); cMsg.Writeuint32(MID_MELEEATTACK); cMsg.WriteObject(hTarget); cMsg.Writeuint32(hNodeHit); cMsg.WriteLTVector(vPos); cMsg.WriteLTVector(vDir); cMsg.Writeint32(g_pGameClientShell->GetServerRealTimeMS()); g_pLTClient->SendToServer(cMsg.Read(), MESSAGE_GUARANTEED); //!!ARL: Maybe DisableCollisions for hTarget if they are blocking? // (to avoid the weirdness of taking damage but still blocking the attack) // For local player targets, send an AttackRecoil stimulus so a proper animation can be played. if (hTarget == g_pPlayerMgr->GetMoveMgr()->GetObject()) { CPlayerBodyMgr::Instance().HandleAnimationStimulus("CS_RecoilFromAttack"); } }