mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix end-of-race standings
This commit is contained in:
parent
52624cb6de
commit
c91986cc97
1 changed files with 20 additions and 9 deletions
19
src/k_kart.c
19
src/k_kart.c
|
|
@ -6035,6 +6035,14 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (G_RaceGametype())
|
if (G_RaceGametype())
|
||||||
|
{
|
||||||
|
if (player->exiting) // End of match standings
|
||||||
|
{
|
||||||
|
// Only time matters
|
||||||
|
if (players[i].realtime < player->realtime)
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// I'm a lap behind this player OR
|
// I'm a lap behind this player OR
|
||||||
// My distance to the finish line is higher, so I'm behind
|
// My distance to the finish line is higher, so I'm behind
|
||||||
|
|
@ -6044,18 +6052,21 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (G_BattleGametype())
|
else if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (player->exiting) // End of match standings
|
if (player->exiting) // End of match standings
|
||||||
{
|
{
|
||||||
if (players[i].marescore > player->marescore) // Only score matters
|
// Only score matters
|
||||||
|
if (players[i].marescore > player->marescore)
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (players[i].kartstuff[k_bumper] == player->kartstuff[k_bumper] && players[i].marescore > player->marescore)
|
// I have less points than but the same bumpers as this player OR
|
||||||
position++;
|
// I have less bumpers than this player
|
||||||
else if (players[i].kartstuff[k_bumper] > player->kartstuff[k_bumper])
|
if ((players[i].kartstuff[k_bumper] == player->kartstuff[k_bumper] && players[i].marescore > player->marescore)
|
||||||
|
|| (players[i].kartstuff[k_bumper] > player->kartstuff[k_bumper]))
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue