From 205cd5856f2fcc14a9bd8a4cd6e5ffc8e1ac0274 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 4 Sep 2019 03:14:41 +0200 Subject: [PATCH] Made it so camera roll is only calculated when the player movetype is MOVETYPE_WALK --- src/client/view.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/view.c b/src/client/view.c index b6007370..78e1913b 100644 --- a/src/client/view.c +++ b/src/client/view.c @@ -104,7 +104,7 @@ float View_CalcRoll(void) { float roll; makevectors(view_angles); - + roll = dotproduct(pSeat->vPlayerVelocity, v_right); roll *= 0.02f; return autocvar_v_camroll ? roll : 0; @@ -249,7 +249,10 @@ void View_DrawViewModel(void) addentity(eViewModel); } View_CalcCamBob(); - view_angles[2] = View_CalcRoll(); + + if (pl.movetype == MOVETYPE_WALK) { + view_angles[2] = View_CalcRoll(); + } } void View_PostDraw(void)