mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Battle: change rankings priority
Highest to lowest: 1. points 2. emeralds 3. bumpers
This commit is contained in:
parent
deac3a373f
commit
9147a17bf3
1 changed files with 8 additions and 8 deletions
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -9285,22 +9285,22 @@ void K_KartUpdatePosition(player_t *player)
|
||||||
UINT8 myEmeralds = K_NumEmeralds(player);
|
UINT8 myEmeralds = K_NumEmeralds(player);
|
||||||
UINT8 yourEmeralds = K_NumEmeralds(&players[i]);
|
UINT8 yourEmeralds = K_NumEmeralds(&players[i]);
|
||||||
|
|
||||||
if (yourEmeralds > myEmeralds)
|
// First compare all points
|
||||||
|
if (players[i].roundscore > player->roundscore)
|
||||||
{
|
{
|
||||||
// Emeralds matter above all
|
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
else if (yourEmeralds == myEmeralds)
|
else if (players[i].roundscore == player->roundscore)
|
||||||
{
|
{
|
||||||
// Bumpers are a tie breaker
|
// Emeralds are a tie breaker
|
||||||
if (players[i].bumpers > player->bumpers)
|
if (yourEmeralds > myEmeralds)
|
||||||
{
|
{
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
else if (players[i].bumpers == player->bumpers)
|
else if (yourEmeralds == myEmeralds)
|
||||||
{
|
{
|
||||||
// Score is the second tier tie breaker
|
// Bumpers are the second tier tie breaker
|
||||||
if (players[i].roundscore > player->roundscore)
|
if (players[i].bumpers > player->bumpers)
|
||||||
{
|
{
|
||||||
position++;
|
position++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue