mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #3961 from fokkonaut/pr-antibot
Add target clientid to antibot OnHammerHit
This commit is contained in:
commit
f03cb08150
|
@ -6,7 +6,7 @@
|
|||
|
||||
enum
|
||||
{
|
||||
ANTIBOT_ABI_VERSION = 4,
|
||||
ANTIBOT_ABI_VERSION = 5,
|
||||
|
||||
ANTIBOT_MSGFLAG_NONVITAL = 1,
|
||||
ANTIBOT_MSGFLAG_FLUSH = 2,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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*/) {}
|
||||
|
|
|
@ -16,7 +16,7 @@ public:
|
|||
virtual void OnSpawn(int ClientID) = 0;
|
||||
virtual void OnHammerFireReloading(int ClientID) = 0;
|
||||
virtual void OnHammerFire(int ClientID) = 0;
|
||||
virtual void OnHammerHit(int ClientID) = 0;
|
||||
virtual void OnHammerHit(int ClientID, int TargetID) = 0;
|
||||
virtual void OnDirectInput(int ClientID) = 0;
|
||||
virtual void OnCharacterTick(int ClientID) = 0;
|
||||
virtual void OnHookAttach(int ClientID, bool Player) = 0;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
@ -225,7 +225,7 @@ void CAntibot::OnPlayerDestroy(int ClientID) {}
|
|||
void CAntibot::OnSpawn(int ClientID) {}
|
||||
void CAntibot::OnHammerFireReloading(int ClientID) {}
|
||||
void CAntibot::OnHammerFire(int ClientID) {}
|
||||
void CAntibot::OnHammerHit(int ClientID) {}
|
||||
void CAntibot::OnHammerHit(int ClientID, int TargetID) {}
|
||||
void CAntibot::OnDirectInput(int ClientID) {}
|
||||
void CAntibot::OnCharacterTick(int ClientID) {}
|
||||
void CAntibot::OnHookAttach(int ClientID, bool Player) {}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue