From 3be7988cd10248447d697746fa60bfcd2f6b093f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 17 Feb 2007 17:35:09 +0000 Subject: [PATCH] fixed printtoconsole crashing on fake clients --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40525 --- core/smn_console.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/smn_console.cpp b/core/smn_console.cpp index ed352fe1..410b6645 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -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;