mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Fix a divide by zero crash when mindash and maxdash were the same.
Props to rumia1 for finding this and Lach for figuring out this was a divide by zero error.
This commit is contained in:
parent
7f092b884b
commit
23b3f5a649
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…
Reference in a new issue