From 46164a7f46c7d0c10775932d97c9662b46b9ddb6 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 26 Oct 2018 01:07:14 -0400 Subject: [PATCH] More consistent face-forward Needs it to still land in a close ballpark, so the timer changes are still needed, but this makes it less prone to error --- src/p_user.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 3b7410a52..ac4847e7b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6654,10 +6654,15 @@ static void P_MovePlayer(player_t *player) } else if (player->kartstuff[k_spinouttimer] > 0 || player->pflags & PF_SLIDING) { + INT32 speed = max(1, min(8, player->kartstuff[k_spinouttimer]/8)); + if (player->mo->state != &states[S_KART_SPIN]) P_SetPlayerMobjState(player->mo, S_KART_SPIN); - player->frameangle -= (ANGLE_11hh * min(8, player->kartstuff[k_spinouttimer]/8)); + if (speed == 1 && abs(player->mo->angle - player->frameangle) < ANGLE_22h) + player->frameangle = player->mo->angle; // Face forward at the end of the animation + else + player->frameangle -= (ANGLE_11hh * speed); } else if (player->powers[pw_nocontrol] && player->pflags & PF_SKIDDOWN) {