- 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 523285b9b0
commit 59850fa768

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