From b4924fdfed28d15f2a70fad7b2437a821d66e78f Mon Sep 17 00:00:00 2001 From: fickleheart Date: Mon, 30 Dec 2019 11:22:54 -0600 Subject: [PATCH] Fix camera reset snap in simple controls --- src/p_user.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index f5a8208a3..7c7f94863 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -9781,7 +9781,13 @@ void P_ResetCamera(player_t *player, camera_t *thiscam) thiscam->y = y; thiscam->z = z; - if (!(thiscam == &camera && (cv_cam_still.value || cv_analog.value)) + if ((thiscam == &camera && cv_abilitydirection[0].value) + || (thiscam == &camera2 && cv_abilitydirection[1].value)) + { + thiscam->angle = (thiscam == &camera) ? localangle : localangle2; + thiscam->aiming = (thiscam == &camera) ? localaiming : localaiming2; + } + else if (!(thiscam == &camera && (cv_cam_still.value || cv_analog.value)) && !(thiscam == &camera2 && (cv_cam2_still.value || cv_analog2.value))) { thiscam->angle = player->mo->angle;