Merge pull request #6912 from sjrc6/pr-use-CFGFLAG_GAME

Execute CFGFLAG_GAME configs from map load on the client
This commit is contained in:
heinrich5991 2023-07-25 10:54:19 +00:00 committed by GitHub
commit 8e04f6cf29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -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)
{

View file

@ -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)