Skip to content

Commit

Permalink
Merge pull request ddnet#8581 from Robyt3/Scoreboard-NonTeams-Blue-Size
Browse files Browse the repository at this point in the history
Fix incorrect scoreboard size if blue team used without teams flag
  • Loading branch information
def- authored Jul 12, 2024
2 parents a21ff5b + e277131 commit 888534e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/client/components/scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ void CScoreboard::OnRender()

const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
const bool Teams = pGameInfoObj && (pGameInfoObj->m_GameFlags & GAMEFLAG_TEAMS);
const int NumPlayers = maximum(GameClient()->m_Snap.m_aTeamSize[TEAM_RED], GameClient()->m_Snap.m_aTeamSize[TEAM_BLUE]);
const auto &aTeamSize = GameClient()->m_Snap.m_aTeamSize;
const int NumPlayers = Teams ? maximum(aTeamSize[TEAM_RED], aTeamSize[TEAM_BLUE]) : aTeamSize[TEAM_RED];

const float ScoreboardSmallWidth = 750.0f + 20.0f;
const float ScoreboardWidth = !Teams && NumPlayers <= 16 ? ScoreboardSmallWidth : 1500.0f;
Expand Down

0 comments on commit 888534e

Please sign in to comment.