Also cap dashspeed to at most maxdash.

This commit is contained in:
GoldenTails 2019-12-24 13:55:19 -06:00
parent a5a8d0c77b
commit 25f8f2706b

View file

@ -4637,6 +4637,10 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
}
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)