mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Fix positions tying at 2nd place
This commit is contained in:
parent
e478d542a0
commit
a19ce98350
1 changed files with 19 additions and 13 deletions
32
src/k_kart.c
32
src/k_kart.c
|
|
@ -6820,24 +6820,30 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (K_NumEmeralds(&players[i]) > K_NumEmeralds(player))
|
UINT8 myEmeralds = K_NumEmeralds(player);
|
||||||
|
UINT8 yourEmeralds = K_NumEmeralds(&players[i]);
|
||||||
|
|
||||||
|
if (yourEmeralds > myEmeralds)
|
||||||
{
|
{
|
||||||
|
// Emeralds matter above all
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
else if (players[i].bumpers > player->bumpers)
|
else if (yourEmeralds == myEmeralds)
|
||||||
{
|
{
|
||||||
position++;
|
// Bumpers are a tie breaker
|
||||||
|
if (players[i].bumpers > player->bumpers)
|
||||||
|
{
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
else if (players[i].bumpers == player->bumpers)
|
||||||
|
{
|
||||||
|
// Score is the second tier tie breaker
|
||||||
|
if (players[i].marescore > player->marescore)
|
||||||
|
{
|
||||||
|
position++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (players[i].marescore > player->marescore)
|
|
||||||
{
|
|
||||||
position++;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
else if (players[i].kartstuff[k_wanted] > player->kartstuff[k_wanted])
|
|
||||||
{
|
|
||||||
position++;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue