mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-05 15:48:19 +00:00
Send Sixup information to antibot
This commit is contained in:
parent
6da2f117cf
commit
416cb37000
|
@ -6,7 +6,7 @@
|
|||
|
||||
enum
|
||||
{
|
||||
ANTIBOT_ABI_VERSION=2,
|
||||
ANTIBOT_ABI_VERSION=3,
|
||||
|
||||
ANTIBOT_MSGFLAG_NONVITAL=1,
|
||||
ANTIBOT_MSGFLAG_FLUSH=2,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue