Merge branch 'dashspeed-fix' into 'next'

Cap dashspeed between mindash and maxdash before revving.

See merge request STJr/SRB2!565
This commit is contained in:
James R 2019-12-31 01:31:43 -05:00
commit 8e61b1003a

View file

@ -4631,6 +4631,12 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
S_StartSound(player->mo, sfx_spin);
break;
}
if (player->dashspeed < player->mindash)
player->dashspeed = player->mindash;
if (player->dashspeed > player->maxdash)
player->dashspeed = player->maxdash;
if (player->dashspeed < player->maxdash && player->mindash != player->maxdash)
{
#define chargecalculation (6*(player->dashspeed - player->mindash))/(player->maxdash - player->mindash)