Merge branch 'fix-invinc-spindash-crack' into 'master'

Don't allow spindash above max power

Closes #1105

See merge request KartKrew/Kart!1998
This commit is contained in:
James R. 2024-03-04 02:46:04 +00:00
commit 69e8a26eaa

View file

@ -11374,7 +11374,7 @@ static void K_KartSpindash(player_t *player)
if (player->spindash > 0 && (buttons & (BT_DRIFT|BT_BRAKE|BT_ACCELERATE)) != (BT_DRIFT|BT_BRAKE|BT_ACCELERATE))
{
player->spindashspeed = (player->spindash * FRACUNIT) / MAXCHARGETIME;
player->spindashspeed = (min(player->spindash, MAXCHARGETIME) * FRACUNIT) / MAXCHARGETIME;
player->spindashboost = TICRATE;
// if spindash was charged enough, give a small thrust.