From dac08a2cb90e5ee0bd7ea3af0c77a9553fe0d527 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 2 Jan 2021 01:15:58 +1100 Subject: [PATCH] - calcviewpitch(): Fix issue with returning `horizoff` to 0 from negative slope. --- source/core/gameinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/gameinput.cpp b/source/core/gameinput.cpp index e948e1fac..2f0fe8fe2 100644 --- a/source/core/gameinput.cpp +++ b/source/core/gameinput.cpp @@ -423,7 +423,7 @@ void calcviewpitch(vec2_t const pos, fixedhoriz* horizoff, binangle const ang, b } if (horizoff->asq16() < 0) { - *horizoff += q16horiz(xs_CRoundToInt(-scaleAdjust * ((horizoff->asq16() >> 3) + FRACUNIT))); + *horizoff += q16horiz(xs_CRoundToInt(-scaleAdjust * ((horizoff->asq16() >> 3) - FRACUNIT))); if (horizoff->asq16() > 0) *horizoff = q16horiz(0); } }