Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoreboard spectator section fixes #490

Merged
merged 1 commit into from
Jul 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions mp/src/game/client/neo/ui/neo_scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,11 @@ void CNEOScoreBoard::AddSection(int teamType, int teamNumber)
{
pPlayerList->AddSection(sectionID, "");

pPlayerList->AddColumnToSection(sectionID, "ping", "", SectionedListPanel::COLUMN_BRIGHT, m_iPingWidth );
pPlayerList->AddColumnToSection(sectionID, "ping", teamNumber == TEAM_UNASSIGNED ? "Unassigned" : "Spectators", SectionedListPanel::COLUMN_BRIGHT, m_iPingWidth );
// Avatars are always displayed at 32x32 regardless of resolution
if ( ShowAvatars() )
{
pPlayerList->AddColumnToSection( sectionID, "avatar", teamNumber == TEAM_UNASSIGNED ? "Unassigned" : "Spectators", SectionedListPanel::COLUMN_IMAGE, m_iAvatarWidth );
pPlayerList->AddColumnToSection( sectionID, "avatar", "", SectionedListPanel::COLUMN_IMAGE, m_iAvatarWidth );
}
pPlayerList->AddColumnToSection(sectionID, "name", "", 0, ShowAvatars() ? m_iNameWidth - m_iAvatarWidth : m_iNameWidth );
}
Expand Down Expand Up @@ -666,7 +666,8 @@ void CNEOScoreBoard::GetPlayerScoreInfo(int playerIndex, KeyValues *kv)

if ( g_PR->IsFakePlayer( playerIndex ) )
{
kv->SetString("ping", "BOT");
// Assume bots in spec are SourceTV etc. Looks cleaner if their ping is just empty string.
kv->SetString("ping", g_PR->GetTeam(playerIndex) <= TEAM_SPECTATOR ? "" : "BOT");
}
else
{
Expand Down