Merge pull request #8892 from ChillerDragon/pr_scoreboard_pause_game

Do not force scoreboard open when the game is paused
This commit is contained in:
Dennis Felsing 2024-09-04 07:15:29 +00:00 committed by GitHub
commit cf107a81a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -797,15 +797,16 @@ bool CScoreboard::Active() const
if(m_Active) if(m_Active)
return true; return true;
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
if(GameClient()->m_Snap.m_pLocalInfo && !GameClient()->m_Snap.m_SpecInfo.m_Active) if(GameClient()->m_Snap.m_pLocalInfo && !GameClient()->m_Snap.m_SpecInfo.m_Active)
{ {
// we are not a spectator, check if we are dead // we are not a spectator, check if we are dead and the game isn't paused
if(!GameClient()->m_Snap.m_pLocalCharacter && g_Config.m_ClScoreboardOnDeath) if(!GameClient()->m_Snap.m_pLocalCharacter && g_Config.m_ClScoreboardOnDeath &&
!(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_PAUSED))
return true; return true;
} }
// if the game is over // if the game is over
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
if(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_GAMEOVER) if(pGameInfoObj && pGameInfoObj->m_GameStateFlags & GAMESTATEFLAG_GAMEOVER)
return true; return true;