Skip to content

Commit 486d20b

Browse files
authored
update alive player count when spectator (#1502)
* init * newline * update in classic too * better * ups
1 parent 95d26f3 commit 486d20b

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/game/client/neo/ui/neo_hud_round_state.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void CNEOHud_RoundState::DrawNeoHudElement()
607607
}
608608
}
609609
}
610-
else if (!cl_neo_hud_scoreboard_hide_others.GetBool() || !g_pNeoScoreBoard->IsVisible())
610+
else
611611
{
612612
DrawPlayerList();
613613
}
@@ -623,11 +623,6 @@ void CNEOHud_RoundState::DrawPlayerList()
623623
const bool localPlayerSpec = !(localPlayerTeam == TEAM_JINRAI || localPlayerTeam == TEAM_NSF);
624624
const int leftTeam = localPlayerSpec ? TEAM_JINRAI : localPlayerTeam;
625625

626-
if (localPlayerSpec)
627-
{
628-
return;
629-
}
630-
631626
int offset = 52;
632627
if (cl_neo_squad_hud_star_scale.GetFloat() > 0)
633628
{
@@ -636,8 +631,10 @@ void CNEOHud_RoundState::DrawPlayerList()
636631
offset *= cl_neo_squad_hud_star_scale.GetFloat() * res.h / 1080.0f;
637632
}
638633

634+
const bool hideDueToScoreboard = cl_neo_hud_scoreboard_hide_others.GetBool() && g_pNeoScoreBoard->IsVisible();
635+
639636
// Draw squad mates
640-
if (g_PR->GetStar(localPlayerIndex) != 0)
637+
if (!localPlayerSpec && g_PR->GetStar(localPlayerIndex) != 0 && !hideDueToScoreboard)
641638
{
642639
bool squadMateFound = false;
643640

@@ -697,7 +694,7 @@ void CNEOHud_RoundState::DrawPlayerList()
697694
m_iLeftPlayersAlive++;
698695
}
699696
}
700-
if (i == localPlayerIndex)
697+
if (i == localPlayerIndex || localPlayerSpec || hideDueToScoreboard)
701698
{
702699
continue;
703700
}

0 commit comments

Comments
 (0)