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:
Peace-Maker 2016-12-04 21:51:08 -07:00
parent 54b0a16219
commit 7d2a18e96a

View File

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