From f0c364c71ceae8450a5b508b27a7d8e6c22967e9 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sun, 19 Mar 2017 22:22:39 +0000 Subject: [PATCH] For melee: * Fixed underwater hop going too high. * Added helpful comment. * Changed animation speed. --- src/info.c | 4 ++-- src/p_user.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index e62b66ccd..60acd2d4b 100644 --- a/src/info.c +++ b/src/info.c @@ -530,8 +530,8 @@ state_t states[NUMSTATES] = {SPR_PLAY, SPR2_TWIN|FF_SPR2ENDSTATE, 1, {NULL}, S_PLAY_JUMP, 0, S_PLAY_TWINSPIN}, // S_PLAY_TWINSPIN // CA2_MELEE - {SPR_PLAY, SPR2_MLEE|FF_SPR2ENDSTATE, 1, {NULL}, S_PLAY_MELEE_FINISH, 0, S_PLAY_MELEE}, // S_PLAY_MELEE - {SPR_PLAY, SPR2_MLEE, 20, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_MELEE_FINISH + {SPR_PLAY, SPR2_MLEE|FF_SPR2ENDSTATE, 2, {NULL}, S_PLAY_MELEE_FINISH, 0, S_PLAY_MELEE}, // S_PLAY_MELEE + {SPR_PLAY, SPR2_MLEE, 70, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_MELEE_FINISH {SPR_PLAY, SPR2_MLEL, 35, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_MELEE_LANDING // SF_SUPER diff --git a/src/p_user.c b/src/p_user.c index c8d0c59e3..ec197765b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3824,7 +3824,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd) { P_DoJump(player, false); player->jumping = 0; - player->mo->momz = FixedMul(player->mo->momz, 3*FRACUNIT/2); + player->mo->momz = FixedMul(player->mo->momz, 3*FRACUNIT/2); // NOT 1.5 times the jump height, but 2.25 times. player->pflags |= PF_THOKKED; P_SetPlayerMobjState(player->mo, S_PLAY_TWINSPIN); S_StartSound(player->mo, sfx_s3k8b); @@ -3834,6 +3834,8 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd) player->powers[pw_nocontrol] = TICRATE; player->mo->z += P_MobjFlip(player->mo); P_SetObjectMomZ(player->mo, player->mindash, false); + if (player->mo->eflags & MFE_UNDERWATER) + player->mo->momz >>= 1; if (FixedMul(player->speed, FINECOSINE(((player->mo->angle - R_PointToAngle2(0, 0, player->rmomx, player->rmomy)) >> ANGLETOFINESHIFT) & FINEMASK)) < FixedMul(player->maxdash, player->mo->scale)) P_InstaThrust(player->mo, player->mo->angle, FixedMul(player->maxdash, player->mo->scale)); player->mo->momx += player->cmomx;