From 148f2cc607e6f641e2fd72bc7b8ce4105056640c Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 15 Sep 2017 20:34:46 +0100 Subject: [PATCH] * Updated the circumstances under which autobrake is applied. * Made drawangle updated when jumping off a wall as Knuckles. --- src/p_user.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 80d16e30b..54ec1af55 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3789,7 +3789,7 @@ void P_DoJump(player_t *player, boolean soundandstate) else player->mo->momz = 15*(FRACUNIT/4); - player->mo->angle = player->mo->angle - ANGLE_180; // Turn around from the wall you were climbing. + player->drawangle = player->mo->angle = player->mo->angle - ANGLE_180; // Turn around from the wall you were climbing. if (!demoplayback || P_AnalogMove(player)) { @@ -9823,7 +9823,8 @@ void P_PlayerThink(player_t *player) { boolean currentlyonground = P_IsObjectOnGround(player->mo); - if (((player->pflags & (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE)) == (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE)) + if (!player->powers[pw_carry] + && ((player->pflags & (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE)) == (PF_AUTOBRAKE|PF_APPLYAUTOBRAKE)) && !(cmd->forwardmove || cmd->sidemove) && (player->rmomx || player->rmomy)) { @@ -9840,10 +9841,12 @@ void P_PlayerThink(player_t *player) } if (!(player->pflags & PF_AUTOBRAKE) + || player->powers[pw_carry] || player->panim == PA_SPRING || player->panim == PA_PAIN || !player->mo->health - || player->pflags & PF_SPINNING) + || player->climbing + || player->pflags & (PF_SPINNING|PF_SLIDING)) player->pflags &= ~PF_APPLYAUTOBRAKE; else if (currentlyonground) player->pflags |= PF_APPLYAUTOBRAKE;