mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
properly calculate exp for remaining grading points when a player no contests
This commit is contained in:
parent
0da0cf4909
commit
9e0920f45e
1 changed files with 10 additions and 0 deletions
10
src/p_user.c
10
src/p_user.c
|
|
@ -3988,6 +3988,16 @@ void P_DoTimeOver(player_t *player)
|
|||
CON_LogMessage(va(M_GetText("%s ran out of time.\n"), player_names[player-players]));
|
||||
}
|
||||
|
||||
// iterate through remaining gradingpoints and update gradingfactor and exp for current position, as if you crossed all of them
|
||||
const UINT32 numgradingpoints = K_GetNumGradingPoints();
|
||||
const UINT32 remaininggradingpoints = numgradingpoints - player->gradingpointnum;
|
||||
for (UINT32 i = 0; i < remaininggradingpoints; i++)
|
||||
{
|
||||
player->gradingfactor += K_GetGradingFactorAdjustment(player, player->gradingpointnum);
|
||||
player->gradingpointnum++;
|
||||
player->exp = K_GetEXP(player);
|
||||
}
|
||||
|
||||
player->pflags |= PF_NOCONTEST;
|
||||
K_UpdatePowerLevelsFinalize(player, false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue