Merge pull request #8869 from ChillerDragon/pr_fix_dead_order

Put dead players at the bottom of the scoreboard
This commit is contained in:
Dennis Felsing 2024-09-01 16:41:08 +00:00 committed by GitHub
commit e17da385dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -349,6 +349,8 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
char aBuf[64]; char aBuf[64];
int MaxTeamSize = m_pClient->Config()->m_SvMaxTeamSize; int MaxTeamSize = m_pClient->Config()->m_SvMaxTeamSize;
for(int RenderDead = 0; RenderDead < 2; RenderDead++)
{
for(int i = 0; i < MAX_CLIENTS; i++) for(int i = 0; i < MAX_CLIENTS; i++)
{ {
// make sure that we render the correct team // 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 DDTeam = GameClient()->m_Teams.Team(pInfo->m_ClientId);
int NextDDTeam = 0; 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(); ColorRGBA TextColor = TextRender()->DefaultTextColor();
TextColor.a = RenderDead ? 0.5f : 1.0f; TextColor.a = RenderDead ? 0.5f : 1.0f;
@ -585,6 +591,7 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
break; break;
} }
} }
}
void CScoreboard::RenderRecordingNotification(float x) void CScoreboard::RenderRecordingNotification(float x)
{ {