mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Resolve Battle score ties caused when Luigi wins by doing nothing.
This commit is contained in:
parent
4839586617
commit
723c479388
1 changed files with 8 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ void K_CheckBumpers(void)
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT8 numingame = 0;
|
UINT8 numingame = 0;
|
||||||
SINT8 winnernum = -1;
|
SINT8 winnernum = -1;
|
||||||
INT32 winnerscoreadd = 0;
|
INT32 winnerscoreadd = 0, maxroundscore = 0;
|
||||||
boolean nobumpers = false;
|
boolean nobumpers = false;
|
||||||
|
|
||||||
if (!(gametyperules & GTR_BUMPERS))
|
if (!(gametyperules & GTR_BUMPERS))
|
||||||
|
|
@ -109,6 +109,11 @@ void K_CheckBumpers(void)
|
||||||
numingame++;
|
numingame++;
|
||||||
winnerscoreadd += players[i].roundscore;
|
winnerscoreadd += players[i].roundscore;
|
||||||
|
|
||||||
|
if (players[i].roundscore > maxroundscore)
|
||||||
|
{
|
||||||
|
maxroundscore = players[i].roundscore;
|
||||||
|
}
|
||||||
|
|
||||||
if (players[i].bumpers <= 0) // if you don't have any bumpers, you're probably not a winner
|
if (players[i].bumpers <= 0) // if you don't have any bumpers, you're probably not a winner
|
||||||
{
|
{
|
||||||
nobumpers = true;
|
nobumpers = true;
|
||||||
|
|
@ -157,6 +162,8 @@ void K_CheckBumpers(void)
|
||||||
|
|
||||||
if (winnernum > -1 && playeringame[winnernum])
|
if (winnernum > -1 && playeringame[winnernum])
|
||||||
{
|
{
|
||||||
|
if ((players[winnernum].roundscore+winnerscoreadd) == maxroundscore)
|
||||||
|
winnerscoreadd++; // break ties if luigi wins by doing nothing
|
||||||
players[winnernum].roundscore += winnerscoreadd;
|
players[winnernum].roundscore += winnerscoreadd;
|
||||||
CONS_Printf(M_GetText("%s recieved %d point%s for winning!\n"), player_names[winnernum], winnerscoreadd, (winnerscoreadd == 1 ? "" : "s"));
|
CONS_Printf(M_GetText("%s recieved %d point%s for winning!\n"), player_names[winnernum], winnerscoreadd, (winnerscoreadd == 1 ? "" : "s"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue