fixed printtoconsole crashing on fake clients

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40525
This commit is contained in:
David Anderson 2007-02-17 17:35:09 +00:00
parent 03e70ebe16
commit 3be7988cd1

View File

@ -446,6 +446,12 @@ static cell_t sm_PrintToConsole(IPluginContext *pCtx, const cell_t *params)
{
return pCtx->ThrowNativeError("Client %d is not in game", index);
}
/* Silent fail on bots, engine will crash */
if (pPlayer->IsFakeClient())
{
return 0;
}
char buffer[1024];
char *fmt;