Instawhip: don't hop if activated in the air

This commit is contained in:
James R 2023-08-19 04:27:51 -07:00
parent fe6da4e087
commit 9e5c9cfbd9

View file

@ -7816,7 +7816,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
}
}
if (!P_MobjWasRemoved(player->whip))
if (!P_MobjWasRemoved(player->whip) && (player->whip->flags2 & MF2_AMBUSH))
{
// Linear acceleration and deceleration to a peak.
// There is a constant total time to complete but the
@ -10963,6 +10963,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
whip->fuse = INSTAWHIP_DURATION;
player->flashing = max(player->flashing, INSTAWHIP_DURATION);
if (P_IsObjectOnGround(player->mo))
{
whip->flags2 |= MF2_AMBUSH;
}
if (!K_PowerUpRemaining(player, POWERUP_BADGE))
{
// Spawn in triangle formation