diff --git a/src/antibot/antibot_interface.h b/src/antibot/antibot_interface.h index b689e4c35..b89220a08 100644 --- a/src/antibot/antibot_interface.h +++ b/src/antibot/antibot_interface.h @@ -22,7 +22,7 @@ ANTIBOTAPI void AntibotOnPlayerDestroy(int ClientID); ANTIBOTAPI void AntibotOnSpawn(int ClientID); ANTIBOTAPI void AntibotOnHammerFireReloading(int ClientID); ANTIBOTAPI void AntibotOnHammerFire(int ClientID); -ANTIBOTAPI void AntibotOnHammerHit(int ClientID); +ANTIBOTAPI void AntibotOnHammerHit(int ClientID, int TargetID); ANTIBOTAPI void AntibotOnDirectInput(int ClientID); ANTIBOTAPI void AntibotOnCharacterTick(int ClientID); ANTIBOTAPI void AntibotOnHookAttach(int ClientID, bool Player); diff --git a/src/antibot/antibot_null.cpp b/src/antibot/antibot_null.cpp index 708f85a45..f9715215b 100644 --- a/src/antibot/antibot_null.cpp +++ b/src/antibot/antibot_null.cpp @@ -28,7 +28,7 @@ void AntibotOnPlayerDestroy(int /*ClientID*/) {} void AntibotOnSpawn(int /*ClientID*/) {} void AntibotOnHammerFireReloading(int /*ClientID*/) {} void AntibotOnHammerFire(int /*ClientID*/) {} -void AntibotOnHammerHit(int /*ClientID*/) {} +void AntibotOnHammerHit(int /*ClientID*/, int /*TargetID*/) {} void AntibotOnDirectInput(int /*ClientID*/) {} void AntibotOnCharacterTick(int /*ClientID*/) {} void AntibotOnHookAttach(int /*ClientID*/, bool /*Player*/) {} diff --git a/src/engine/server/antibot.cpp b/src/engine/server/antibot.cpp index 5633aa962..90c08e9d7 100644 --- a/src/engine/server/antibot.cpp +++ b/src/engine/server/antibot.cpp @@ -120,10 +120,10 @@ void CAntibot::OnHammerFire(int ClientID) Update(); AntibotOnHammerFire(ClientID); } -void CAntibot::OnHammerHit(int ClientID) +void CAntibot::OnHammerHit(int ClientID, int TargetID) { Update(); - AntibotOnHammerHit(ClientID); + AntibotOnHammerHit(ClientID, TargetID); } void CAntibot::OnDirectInput(int ClientID) { diff --git a/src/engine/server/antibot.h b/src/engine/server/antibot.h index a73a6d98b..af032201d 100644 --- a/src/engine/server/antibot.h +++ b/src/engine/server/antibot.h @@ -46,7 +46,7 @@ public: virtual void OnSpawn(int ClientID); virtual void OnHammerFireReloading(int ClientID); virtual void OnHammerFire(int ClientID); - virtual void OnHammerHit(int ClientID); + virtual void OnHammerHit(int ClientID, int TargetID); virtual void OnDirectInput(int ClientID); virtual void OnCharacterTick(int ClientID); virtual void OnHookAttach(int ClientID, bool Player); diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index eb8645c3c..79c47b364 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -456,7 +456,7 @@ void CCharacter::FireWeapon() if(m_FreezeHammer) pTarget->Freeze(); - Antibot()->OnHammerHit(m_pPlayer->GetCID()); + Antibot()->OnHammerHit(m_pPlayer->GetCID(), pTarget->GetPlayer()->GetCID()); Hits++; }