1.1 --- a/core/ConCmdManager.cpp Wed Jan 29 13:07:50 2014 -0500
1.2 +++ b/core/ConCmdManager.cpp Wed Jan 29 21:41:41 2014 -0700
1.3 @@ -413,10 +413,12 @@
1.4 return true;
1.5 }
1.6
1.7 -#if SOURCE_ENGINE != SE_DOTA
1.8 - edict_t *pEdict = PEntityOfEntIndex(client);
1.9 -#endif
1.10 -
1.11 + CPlayer *pPlayer = g_Players.GetPlayerByIndex(client);
1.12 + if (!pPlayer)
1.13 + {
1.14 + return false;
1.15 + }
1.16 +
1.17 /* If we got here, the command failed... */
1.18 char buffer[128];
1.19 if (!logicore.CoreTranslate(buffer, sizeof(buffer), "%T", 2, NULL, "No Access", &client))
1.20 @@ -429,11 +431,7 @@
1.21 {
1.22 char fullbuffer[192];
1.23 UTIL_Format(fullbuffer, sizeof(fullbuffer), "[SM] %s.\n", buffer);
1.24 -#if SOURCE_ENGINE == SE_DOTA
1.25 - engine->ClientPrintf(client, fullbuffer);
1.26 -#else
1.27 - engine->ClientPrintf(pEdict, fullbuffer);
1.28 -#endif
1.29 + pPlayer->PrintToConsole(fullbuffer);
1.30 }
1.31 else if (replyto == SM_REPLY_CHAT)
1.32 {