From f0b32b6078cca9dd9cbad82b586e79f8ea52495c Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 20 Sep 2020 18:25:16 +1000 Subject: [PATCH] - SW: Implement `cl_viewbob`. --- source/sw/src/draw.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 41188c81f..06bb98c05 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -1726,8 +1726,11 @@ drawscreen(PLAYERp pp, double smoothratio) if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE)) { - tz += bob_amt; - tz += pp->obob_z + xs_CRoundToInt(fmulscale16(pp->bob_z - pp->obob_z, smoothratio)); + if (cl_viewbob) + { + tz += bob_amt; + tz += pp->obob_z + xs_CRoundToInt(fmulscale16(pp->bob_z - pp->obob_z, smoothratio)); + } // recoil only when not in camera tq16horiz = tq16horiz + pp->recoil_horizoff;