Don't call IClient::ClientPrintf on the bot twice
The second time would be a nop anyway, so why bother.
This commit is contained in:
parent
54b0a16219
commit
7d2a18e96a
@ -254,12 +254,9 @@ void HLTVServerWrapper::OnCGameClient_ClientPrintf_Post(const char* buf)
|
||||
IClient *pClient = (IClient *)((intptr_t)pGameClient + 4);
|
||||
HandleClientPrintf(pClient, buf);
|
||||
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
// Left4Dead doesn't check the netchan before using it
|
||||
// We already called the function in HandleClientPrintf.
|
||||
// Would crash or not do anything anyways.
|
||||
RETURN_META(MRES_SUPERCEDE);
|
||||
#else
|
||||
RETURN_META(MRES_IGNORED);
|
||||
#endif
|
||||
}
|
||||
|
||||
void HLTVServerWrapper::OnIClient_ClientPrintf_Post(const char* buf)
|
||||
@ -267,12 +264,9 @@ void HLTVServerWrapper::OnIClient_ClientPrintf_Post(const char* buf)
|
||||
IClient *pClient = META_IFACEPTR(IClient);
|
||||
HandleClientPrintf(pClient, buf);
|
||||
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD || SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
// Left4Dead doesn't check the netchan before using it
|
||||
// We already called the function in HandleClientPrintf.
|
||||
// Would crash or not do anything anyways.
|
||||
RETURN_META(MRES_SUPERCEDE);
|
||||
#else
|
||||
RETURN_META(MRES_IGNORED);
|
||||
#endif
|
||||
}
|
||||
|
||||
void HLTVServerWrapper::HandleClientPrintf(IClient *pClient, const char* buf)
|
||||
|
Loading…
Reference in New Issue
Block a user