mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8869 from ChillerDragon/pr_fix_dead_order
Put dead players at the bottom of the scoreboard
This commit is contained in:
commit
e17da385dd
|
@ -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;
|
||||
|
@ -584,6 +590,7 @@ void CScoreboard::RenderScoreboard(CUIRect Scoreboard, int Team, int CountStart,
|
|||
if(CountRendered == CountEnd)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CScoreboard::RenderRecordingNotification(float x)
|
||||
|
|
Loading…
Reference in a new issue