K_PlayerFinishGrandPrix: Cap RINGTOTAL to 20 when writing to totalring and grandprixinfo rank

Permitted 109/100 rings at the end of GP !?
This commit is contained in:
toaster 2023-05-30 13:12:10 +01:00
parent 4387ea2f71
commit 782da8c325

View file

@ -815,10 +815,13 @@ void K_PlayerFinishGrandPrix(player_t *player)
grandprixinfo.wonround = true;
// Increase your total rings
if (RINGTOTAL(player) > 0)
INT32 ringtotal = RINGTOTAL(player);
if (ringtotal > 0)
{
player->totalring += RINGTOTAL(player);
grandprixinfo.rank.rings += RINGTOTAL(player);
if (ringtotal > 20)
ringtotal = 20;
player->totalring += ringtotal;
grandprixinfo.rank.rings += ringtotal;
}
if (grandprixinfo.eventmode == GPEVENT_NONE)