Send Sixup information to antibot

This commit is contained in:
Learath 2020-07-01 15:11:37 +03:00
parent 6da2f117cf
commit 416cb37000
7 changed files with 8 additions and 8 deletions

View file

@ -6,7 +6,7 @@
enum
{
ANTIBOT_ABI_VERSION=2,
ANTIBOT_ABI_VERSION=3,
ANTIBOT_MSGFLAG_NONVITAL=1,
ANTIBOT_MSGFLAG_FLUSH=2,

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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