From 4fe7aaa43f0892b7d7c4e51f9b25670bcc210cda Mon Sep 17 00:00:00 2001 From: Tater Date: Mon, 24 Jul 2023 18:42:47 -0500 Subject: [PATCH] execute CFGFLAG_GAME configs on the client --- src/engine/shared/console.cpp | 6 +++++- src/game/client/gameclient.cpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index d59902f6d..fce076f31 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -438,7 +438,11 @@ void CConsole::ExecuteLineStroked(int Stroke, const char *pStr, int ClientID, bo if(!*Result.m_pCommand) return; - CCommand *pCommand = FindCommand(Result.m_pCommand, m_FlagMask); + CCommand *pCommand; + if(ClientID == IConsole::CLIENT_ID_GAME) + pCommand = FindCommand(Result.m_pCommand, m_FlagMask | CFGFLAG_GAME); + else + pCommand = FindCommand(Result.m_pCommand, m_FlagMask); if(pCommand) { diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 9e9ee8dc4..168f202b9 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -522,6 +522,7 @@ void CGameClient::OnConnected() m_GameWorld.m_WorldConfig.m_InfiniteAmmo = true; mem_zero(&m_GameInfo, sizeof(m_GameInfo)); m_PredictedDummyID = -1; + Console()->ResetServerGameSettings(); LoadMapSettings(); if(Client()->State() != IClient::STATE_DEMOPLAYBACK && g_Config.m_ClAutoDemoOnConnect)