From 38d92b23b96bd20c35fd41affa26332feb5a43d7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 27 Apr 2016 15:41:22 +0200 Subject: [PATCH] - fixed: ACS's GetSectorCeilingZ and GetSectorFloorZ expected integer coordinates. --- src/p_acs.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 088612e2aa..0031382113 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -8750,23 +8750,24 @@ scriptwait: { int tag = STACK(3); int secnum; - DVector2 pos(ACSToDouble(STACK(2)), ACSToDouble(STACK(1))); + double x = double(STACK(2)); + double y = double(STACK(1)); double z = 0; if (tag != 0) secnum = P_FindFirstSectorFromTag (tag); else - secnum = int(P_PointInSector (pos) - sectors); + secnum = int(P_PointInSector (x, y) - sectors); if (secnum >= 0) { if (pcd == PCD_GETSECTORFLOORZ) { - z = sectors[secnum].floorplane.ZatPoint (pos); + z = sectors[secnum].floorplane.ZatPoint (x, y); } else { - z = sectors[secnum].ceilingplane.ZatPoint (pos); + z = sectors[secnum].ceilingplane.ZatPoint (x, y); } } sp -= 2;