- SW: When adjusting horizon in DoPlayerDeathHoriz(), just use integer horizon values and not Q16.16.

This commit is contained in:
Mitch Richters 2021-11-01 23:30:17 +11:00
parent 1363ed654c
commit 3e25637385

View file

@ -6038,12 +6038,12 @@ DoPlayerBeginDie(PLAYERp pp)
void
DoPlayerDeathHoriz(PLAYERp pp, short target, short speed)
{
if ((pp->horizon.horiz.asq16() - IntToFixed(target)) > FRACUNIT)
if ((pp->horizon.horiz.asbuild() - target) > 1)
{
pp->horizon.addadjustment(-speed);
}
if ((IntToFixed(target) - pp->horizon.horiz.asq16()) > FRACUNIT)
if ((target - pp->horizon.horiz.asbuild()) > 1)
{
pp->horizon.addadjustment(speed);
}