From 416cb370004c65ac405e3aa26527dea02a86991b Mon Sep 17 00:00:00 2001 From: Learath Date: Wed, 1 Jul 2020 15:11:37 +0300 Subject: [PATCH] Send Sixup information to antibot --- src/antibot/antibot_data.h | 2 +- src/antibot/antibot_interface.h | 2 +- src/antibot/antibot_null.cpp | 2 +- src/engine/antibot.h | 2 +- src/engine/server/antibot.cpp | 4 ++-- src/engine/server/antibot.h | 2 +- src/engine/server/server.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/antibot/antibot_data.h b/src/antibot/antibot_data.h index fff2369a4..811210502 100644 --- a/src/antibot/antibot_data.h +++ b/src/antibot/antibot_data.h @@ -6,7 +6,7 @@ enum { - ANTIBOT_ABI_VERSION=2, + ANTIBOT_ABI_VERSION=3, ANTIBOT_MSGFLAG_NONVITAL=1, ANTIBOT_MSGFLAG_FLUSH=2, diff --git a/src/antibot/antibot_interface.h b/src/antibot/antibot_interface.h index 8b75432d1..0f9af519a 100644 --- a/src/antibot/antibot_interface.h +++ b/src/antibot/antibot_interface.h @@ -22,7 +22,7 @@ void AntibotOnDirectInput(int ClientID); void AntibotOnCharacterTick(int ClientID); void AntibotOnHookAttach(int ClientID, bool Player); void AntibotOnEngineTick(void); -void AntibotOnEngineClientJoin(int ClientID); +void AntibotOnEngineClientJoin(int ClientID, bool Sixup); void AntibotOnEngineClientDrop(int ClientID, const char *pReason); void AntibotOnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags); diff --git a/src/antibot/antibot_null.cpp b/src/antibot/antibot_null.cpp index 1950b850d..aa8ffef2c 100644 --- a/src/antibot/antibot_null.cpp +++ b/src/antibot/antibot_null.cpp @@ -32,7 +32,7 @@ void AntibotOnDirectInput(int ClientID) { (void)ClientID; } void AntibotOnCharacterTick(int ClientID) { (void)ClientID; } void AntibotOnHookAttach(int ClientID, bool Player) { (void)ClientID; (void)Player; } void AntibotOnEngineTick(void) { } -void AntibotOnEngineClientJoin(int ClientID) { (void)ClientID; } +void AntibotOnEngineClientJoin(int ClientID, bool Sixup) { (void)ClientID; (void)Sixup; } void AntibotOnEngineClientDrop(int ClientID, const char *pReason) { (void)ClientID; (void)pReason; } void AntibotOnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags) { (void)ClientID; (void)pData; (void)Size; (void)Flags; } diff --git a/src/engine/antibot.h b/src/engine/antibot.h index f8a3637cc..d5d48d116 100644 --- a/src/engine/antibot.h +++ b/src/engine/antibot.h @@ -35,7 +35,7 @@ public: // Hooks virtual void OnEngineTick() = 0; - virtual void OnEngineClientJoin(int ClientID) = 0; + virtual void OnEngineClientJoin(int ClientID, bool Sixup) = 0; virtual void OnEngineClientDrop(int ClientID, const char *pReason) = 0; virtual void OnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags) = 0; diff --git a/src/engine/server/antibot.cpp b/src/engine/server/antibot.cpp index 4401f7e1d..96e972f26 100644 --- a/src/engine/server/antibot.cpp +++ b/src/engine/server/antibot.cpp @@ -106,7 +106,7 @@ void CAntibot::OnCharacterTick(int ClientID) { Update(); AntibotOnCharacterTick( void CAntibot::OnHookAttach(int ClientID, bool Player) { Update(); AntibotOnHookAttach(ClientID, Player); } void CAntibot::OnEngineTick() { Update(); AntibotOnEngineTick(); } -void CAntibot::OnEngineClientJoin(int ClientID) { Update(); AntibotOnEngineClientJoin(ClientID); } +void CAntibot::OnEngineClientJoin(int ClientID, bool Sixup) { Update(); AntibotOnEngineClientJoin(ClientID, Sixup); } void CAntibot::OnEngineClientDrop(int ClientID, const char *pReason) { Update(); AntibotOnEngineClientDrop(ClientID, pReason); } void CAntibot::OnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags) { @@ -159,7 +159,7 @@ void CAntibot::OnCharacterTick(int ClientID) { } void CAntibot::OnHookAttach(int ClientID, bool Player) { } void CAntibot::OnEngineTick() { } -void CAntibot::OnEngineClientJoin(int ClientID) { } +void CAntibot::OnEngineClientJoin(int ClientID, bool Sixup) { } void CAntibot::OnEngineClientDrop(int ClientID, const char *pReason) { } void CAntibot::OnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags) { } #endif diff --git a/src/engine/server/antibot.h b/src/engine/server/antibot.h index 8639f5d03..6b10df979 100644 --- a/src/engine/server/antibot.h +++ b/src/engine/server/antibot.h @@ -30,7 +30,7 @@ public: virtual void Init(); virtual void OnEngineTick(); - virtual void OnEngineClientJoin(int ClientID); + virtual void OnEngineClientJoin(int ClientID, bool Sixup); virtual void OnEngineClientDrop(int ClientID, const char *pReason); virtual void OnEngineClientMessage(int ClientID, const void *pData, int Size, int Flags); diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index ea222886a..439f6d03d 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -991,7 +991,7 @@ int CServer::NewClientCallback(int ClientID, void *pUser, bool Sixup) pThis->m_aClients[ClientID].Reset(); pThis->GameServer()->OnClientEngineJoin(ClientID, Sixup); - pThis->Antibot()->OnEngineClientJoin(ClientID); + pThis->Antibot()->OnEngineClientJoin(ClientID, Sixup); pThis->m_aClients[ClientID].m_Sixup = Sixup;