Skip to content

Commit ceccaa7

Browse files
committed
add ready into new scoreboard
1 parent 02747c5 commit ceccaa7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/game/client/components/scoreboard.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ void CScoreboard::RenderTeamScoreboard(int Team, CUIRect &MainView, float LineHe
305305
const vec4 LocalHighlightColor(1.0f, 1.0f, 1.0f, 0.5f);
306306
const vec4 TeamRectColor = Team == TEAM_RED ? vec4(1.0f, 0.0f, 0.0f, 0.25f) : vec4(0.0f, 0.0f, 1.0f, 0.25f);
307307

308+
const bool ReadyMode = m_pClient->m_Snap.m_pGameData && m_pClient->m_Snap.m_pGameData->m_GameStateEndTick == 0;
308309
for(int i = 0; i < MAX_CLIENTS; i++)
309310
{
310311
const CGameClient::CPlayerInfoItem *pInfo = &m_pClient->m_Snap.m_aInfoByScore[i];
@@ -387,11 +388,19 @@ void CScoreboard::RenderTeamScoreboard(int Team, CUIRect &MainView, float LineHe
387388
UI()->DoLabel(&PlayerName, aBuf, LineFontSize, TEXTALIGN_ML, 100.0f, false);
388389
}
389390
Playerline.VSplitLeft(Spacing, 0, &Playerline);
391+
// ready / watching
392+
if(ReadyMode && pInfo->m_pPlayerInfo->m_PlayerFlags & PLAYERFLAG_READY)
393+
{
394+
CUIRect PlayerReady;
395+
Playerline.VSplitLeft(20.0f, &PlayerReady, &Playerline);
396+
UI()->DoLabelColor(&PlayerReady, vec4(0.1f, 1.0f, 0.1f, 1.0f), "\xE2\x9C\x93", LineFontSize, TEXTALIGN_ML, 20.0f, false);
397+
}
398+
Playerline.VSplitLeft(Spacing, 0, &Playerline);
390399
{
391400
CUIRect PlayerClan;
392401
Playerline.VSplitLeft(80.0f, &PlayerClan, &Playerline);
393402
str_copy(aBuf, pData->m_aClan, sizeof(aBuf));
394-
UI()->DoLabelColor(&PlayerClan, GreyTextColor, aBuf, LineFontSize, TEXTALIGN_MC, 100.0f, false);
403+
UI()->DoLabelColor(&PlayerClan, GreyTextColor, aBuf, LineFontSize, TEXTALIGN_MC, 80.0f, false);
395404
}
396405
Playerline.VSplitLeft(Spacing, 0, &Playerline);
397406
{

0 commit comments

Comments
 (0)