From a053b117e18bb806753632551c4c82b13728cc48 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 21 Oct 2016 11:08:32 +0100 Subject: [PATCH] Moved the Super Sonic hover over to holding down the jump button (which conveniently links it pretty closely to the thok, which could be called the Float Thok or something I dunno.) Also, only one shield ability is selectively blocked by being Super now, and that's because Invincibility does it too and therefore I assume that's a match balance thing instead of a keyboard clash. --- src/p_user.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index c2115ff7d..794f2b5a8 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4361,10 +4361,10 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd) player->secondjump = 2; - // If letting go of the jump button while still on ascent, cut the jump height. - if (player->pflags & PF_JUMPED && P_MobjFlip(player->mo)*player->mo->momz > 0 && player->jumping == 1) + if (player->pflags & PF_JUMPED && player->jumping == 1) { - player->mo->momz >>= 1; + if (P_MobjFlip(player->mo)*player->mo->momz > 0) + player->mo->momz >>= 1; // If letting go of the jump button while still on ascent, cut the jump height. player->jumping = 0; } } @@ -7005,9 +7005,9 @@ static void P_MovePlayer(player_t *player) //STUFF! // /////////////////////////// - if (cmd->buttons & BT_USE) // Spin button effects + if (player->pflags & PF_JUMPED) { - if (player->pflags & PF_JUMPED) // If the player is jumping + if (cmd->buttons & BT_USE) // Spin button effects { if (!(player->pflags & (PF_USEDOWN|PF_GLIDING|PF_SLIDING|PF_SHIELDABILITY)) // If the player is not holding down BT_USE, or having used an ability previously && (!(player->pflags & PF_THOKKED) || ((player->powers[pw_shield] & SH_NOSTACK) == SH_BUBBLEWRAP && player->secondjump == UINT8_MAX))) // thokked is optional if you're bubblewrapped @@ -7031,8 +7031,7 @@ static void P_MovePlayer(player_t *player) // Whirlwind/Thundercoin shield activation case SH_WHIRLWIND: case SH_THUNDERCOIN: - if (!player->powers[pw_super]) - P_DoJumpShield(player); + P_DoJumpShield(player); break; // Armageddon shield activation case SH_ARMAGEDDON: @@ -7077,7 +7076,9 @@ static void P_MovePlayer(player_t *player) } } } - // Super Sonic move + } + else if (cmd->buttons & BT_JUMP && !player->jumping) // Super Sonic move + { if (player->skin == 0 && player->powers[pw_super] && player->speed > FixedMul(5<mo->scale) && P_MobjFlip(player->mo)*player->mo->momz <= 0) {