mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Merge pull request #8581 from Robyt3/Scoreboard-NonTeams-Blue-Size
Fix incorrect scoreboard size if blue team used without teams flag
This commit is contained in:
commit
888534e070
|
@ -561,7 +561,8 @@ void CScoreboard::OnRender()
|
||||||
|
|
||||||
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
|
const CNetObj_GameInfo *pGameInfoObj = GameClient()->m_Snap.m_pGameInfoObj;
|
||||||
const bool Teams = pGameInfoObj && (pGameInfoObj->m_GameFlags & GAMEFLAG_TEAMS);
|
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 ScoreboardSmallWidth = 750.0f + 20.0f;
|
||||||
const float ScoreboardWidth = !Teams && NumPlayers <= 16 ? ScoreboardSmallWidth : 1500.0f;
|
const float ScoreboardWidth = !Teams && NumPlayers <= 16 ? ScoreboardSmallWidth : 1500.0f;
|
||||||
|
|
Loading…
Reference in a new issue