Add target clientid to antibot OnHammerHit

This commit is contained in:
fokkonaut 2021-07-21 22:28:59 +02:00
parent 2aafda3fcb
commit e30db2bf29
5 changed files with 6 additions and 6 deletions

View file

@ -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);

View file

@ -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*/) {}

View file

@ -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)
{

View file

@ -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);

View file

@ -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++;
}