mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-24 08:52:33 +00:00
Have HU_DrawRankings and K_drawKartPositionFaces learn a thing or two from each other, considering the latter was originally copypasted code from the former but then diverged a bit.
Hopefully this solves our disconnect woes.
This commit is contained in:
parent
c71e71a4b4
commit
bac297b658
2 changed files with 9 additions and 6 deletions
|
|
@ -2733,7 +2733,7 @@ static void HU_DrawRankings(void)
|
|||
tab[i].name = NULL;
|
||||
tab[i].count = INT32_MAX;
|
||||
|
||||
if (!playeringame[i] || players[i].spectator)
|
||||
if (!playeringame[i] || players[i].spectator || !players[i].mo)
|
||||
continue;
|
||||
|
||||
numplayersingame++;
|
||||
|
|
@ -2744,7 +2744,7 @@ static void HU_DrawRankings(void)
|
|||
UINT8 lowestposition = MAXPLAYERS;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || completed[i])
|
||||
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
|
||||
continue;
|
||||
|
||||
if (players[i].kartstuff[k_position] >= lowestposition)
|
||||
|
|
|
|||
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -6431,16 +6431,19 @@ static boolean K_drawKartPositionFaces(void)
|
|||
|
||||
for (j = 0; j < numplayersingame; j++)
|
||||
{
|
||||
UINT8 lowestposition = MAXPLAYERS;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
|
||||
continue;
|
||||
|
||||
if (rankplayer[ranklines] < 0 || players[i].kartstuff[k_position] < players[rankplayer[ranklines]].kartstuff[k_position])
|
||||
{
|
||||
rankplayer[ranklines] = i;
|
||||
}
|
||||
if (players[i].kartstuff[k_position] >= lowestposition)
|
||||
continue;
|
||||
|
||||
rankplayer[ranklines] = i;
|
||||
lowestposition = players[i].kartstuff[k_position];
|
||||
}
|
||||
|
||||
i = rankplayer[ranklines];
|
||||
|
||||
completed[i] = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue