From 8c85e1ec685bc144769fff9f1523ac3c9e49178a Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:05:13 +0100 Subject: [PATCH] Revert "Engine: properly detect if we are in single player mode" This reverts commit 9939d963efa13332a1b9c2cf0d53bd90bc772ed1. It turns out we actually should check on !g_pServer->IsActive() as we shouldn't restrict on our listen server. Development code heavily relies on this. --- src/engine/client/clientstate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/client/clientstate.cpp b/src/engine/client/clientstate.cpp index d32d80b7..6b622e88 100644 --- a/src/engine/client/clientstate.cpp +++ b/src/engine/client/clientstate.cpp @@ -25,8 +25,6 @@ #include #include -extern CGlobalVarsBase* gpGlobals; - //------------------------------------------------------------------------------ // Purpose: console command callbacks //------------------------------------------------------------------------------ @@ -236,8 +234,8 @@ bool CClientState::_ProcessStringCmd(CClientState* thisptr, NET_StringCmd* msg) if (thisptr_ADJ->m_bRestrictServerCommands #ifndef CLIENT_DLL - // Don't restrict commands from the server in single player - && gpGlobals->gameMode != GameMode_t::SP_MODE + // Don't restrict commands if we are on our own listen server + && !g_pServer->IsActive() #endif // !CLIENT_DLL ) {