- calcviewpitch(): Fix issue with returning horizoff to 0 from negative slope.

This commit is contained in:
Mitchell Richters 2021-01-02 01:15:58 +11:00
parent 8003753989
commit dac08a2cb9

View file

@ -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);
}
}