From ac13bd81af33b796eaca74465c0b5bcc2b922511 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 2 Jan 2023 11:00:47 +1100 Subject: [PATCH] - Fix bad Z test in `WarpPlane()`. * Originates from incomplete change in 7eba7aacbda136a98f6ca1a5c7e54c0017c342a6. * Fixes #832. --- source/games/sw/src/warp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/sw/src/warp.cpp b/source/games/sw/src/warp.cpp index 8816bc1e3..5c1a703b3 100644 --- a/source/games/sw/src/warp.cpp +++ b/source/games/sw/src/warp.cpp @@ -95,7 +95,7 @@ DSWActor* WarpPlane(DVector3& pos, sectortype** sect, double testz) if (sp_ceiling) { - if (pos.Z <= sp_ceiling->spr.pos.Z) + if (testz <= sp_ceiling->spr.pos.Z) { return WarpToArea(sp_ceiling, pos, sect); } @@ -103,7 +103,7 @@ DSWActor* WarpPlane(DVector3& pos, sectortype** sect, double testz) if (sp_floor) { - if (pos.Z >= sp_floor->spr.pos.Z) + if (testz >= sp_floor->spr.pos.Z) { return WarpToArea(sp_floor, pos, sect); }