mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-14 10:42:30 +00:00
Merge branch 'fix-divby0-spindash-crash' into 'next'
Fix a divide by zero crash when mindash and maxdash were the same. See merge request STJr/SRB2!539
This commit is contained in:
commit
ebcd9923b1
1 changed files with 1 additions and 1 deletions
|
|
@ -4635,7 +4635,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
|
|||
S_StartSound(player->mo, sfx_spin);
|
||||
break;
|
||||
}
|
||||
if (player->dashspeed < player->maxdash)
|
||||
if (player->dashspeed < player->maxdash && player->mindash != player->maxdash)
|
||||
{
|
||||
#define chargecalculation (6*(player->dashspeed - player->mindash))/(player->maxdash - player->mindash)
|
||||
fixed_t soundcalculation = chargecalculation;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue