- Fix bad Z test in WarpPlane().

* Originates from incomplete change in 7eba7aacbd.
* Fixes #832.
This commit is contained in:
Mitchell Richters 2023-01-02 11:00:47 +11:00
parent ad0860f4bf
commit ac13bd81af

View file

@ -95,7 +95,7 @@ DSWActor* WarpPlane(DVector3& pos, sectortype** sect, double testz)
if (sp_ceiling) if (sp_ceiling)
{ {
if (pos.Z <= sp_ceiling->spr.pos.Z) if (testz <= sp_ceiling->spr.pos.Z)
{ {
return WarpToArea(sp_ceiling, pos, sect); return WarpToArea(sp_ceiling, pos, sect);
} }
@ -103,7 +103,7 @@ DSWActor* WarpPlane(DVector3& pos, sectortype** sect, double testz)
if (sp_floor) if (sp_floor)
{ {
if (pos.Z >= sp_floor->spr.pos.Z) if (testz >= sp_floor->spr.pos.Z)
{ {
return WarpToArea(sp_floor, pos, sect); return WarpToArea(sp_floor, pos, sect);
} }