mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix numlaps 0 crash
Doesn't award exp proper on crossing position line but at least it doesnt crash
This commit is contained in:
parent
bf6a5babfb
commit
4db9773488
1 changed files with 1 additions and 1 deletions
|
|
@ -15500,7 +15500,7 @@ UINT16 K_GetDisplayEXP(player_t *player)
|
|||
|
||||
// target is where you should be if you're doing good and at a 1.0 mult
|
||||
fixed_t clampedexp = max(FRACUNIT/2, min(FRACUNIT*5/4, player->exp)); // clamp between 0.5 and 1.25
|
||||
fixed_t targetdisplayexp = (TARGETDISPLAYEXP*player->gradingpointnum/numgradingpoints)<<FRACBITS;
|
||||
fixed_t targetdisplayexp = (TARGETDISPLAYEXP*player->gradingpointnum/max(1,numgradingpoints))<<FRACBITS;
|
||||
UINT16 displayexp = FixedMul(clampedexp, targetdisplayexp)>>FRACBITS;
|
||||
|
||||
return displayexp;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue