Put dead players at the bottom of the scoreboard

Closed #8868
This commit is contained in:
ChillerDragon 2024-09-01 19:17:03 +08:00
parent d9b031c887
commit 2a26c1c5d6

View file

@ -349,6 +349,8 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
char aBuf[64];
int MaxTeamSize = m_pClient->Config()->m_SvMaxTeamSize;
for(int RenderDead = 0; RenderDead < 2; RenderDead++)
{
for(int i = 0; i < MAX_CLIENTS; i++)
{
// make sure that we render the correct team
@ -361,7 +363,11 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
int DDTeam = GameClient()->m_Teams.Team(pInfo->m_ClientId);
int NextDDTeam = 0;
bool RenderDead = Client()->m_TranslationContext.m_aClients[pInfo->m_ClientId].m_PlayerFlags7 & protocol7::PLAYERFLAG_DEAD;
bool IsDead = Client()->m_TranslationContext.m_aClients[pInfo->m_ClientId].m_PlayerFlags7 & protocol7::PLAYERFLAG_DEAD;
if(!RenderDead && IsDead)
continue;
if(RenderDead && !IsDead)
continue;
ColorRGBA TextColor = TextRender()->DefaultTextColor();
TextColor.a = RenderDead ? 0.5f : 1.0f;
@ -585,6 +591,7 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
break;
}
}
}
void CScoreboard::RenderRecordingNotification(float x)
{