From ed2b107bc9f4c8710fd1eab7ebe2406128c54173 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 22 Feb 2016 13:31:15 +0100 Subject: [PATCH] - fixed: P_LineOpening_XFloors set some floor-related info in the ceiling case so that it never reached the point where it is needed. - fixed: FMultiBlockLinesIterator/FMultiBlockThingsIterator need to treat radius=-1 as 'use default from actor.' --- src/p_3dfloors.cpp | 14 +++++++------- src/p_maputl.cpp | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 08050133a8..cec3b1c509 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -821,13 +821,6 @@ void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *li open.floorpic = highestfloorpic; open.floorterrain = highestfloorterrain; open.bottomsec = highestfloorsec; - } - - if(lowestceiling < open.top) - { - open.top = lowestceiling; - open.ceilingpic = lowestceilingpic; - open.topsec = lowestceilingsec; if (highestfloorplanes[0]) { open.frontfloorplane = *highestfloorplanes[0]; @@ -840,6 +833,13 @@ void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *li } } + if(lowestceiling < open.top) + { + open.top = lowestceiling; + open.ceilingpic = lowestceilingpic; + open.topsec = lowestceilingsec; + } + open.lowfloor = MIN(lowestfloor[0], lowestfloor[1]); } } diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 60d94e4b45..1f32d6faa1 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -726,7 +726,7 @@ FMultiBlockLinesIterator::FMultiBlockLinesIterator(FPortalGroupArray &check, AAc { checkpoint = origin->Pos(); if (!check.inited) P_CollectConnectedGroups(origin->Sector->PortalGroup, checkpoint, origin->Top(), checkradius, checklist); - checkpoint.z = checkradius; + checkpoint.z = checkradius == -1? origin->radius : checkradius; basegroup = origin->Sector->PortalGroup; Reset(); } @@ -801,7 +801,6 @@ bool FMultiBlockLinesIterator::Next(FMultiBlockLinesIterator::CheckResult *item) item->line = line; item->position.x = offset.x; item->position.y = offset.y; - item->position.z = checkpoint.z; item->portalflags = portalflags; return true; } @@ -1059,7 +1058,7 @@ FMultiBlockThingsIterator::FMultiBlockThingsIterator(FPortalGroupArray &check, A { checkpoint = origin->Pos(); if (!check.inited) P_CollectConnectedGroups(origin->Sector->PortalGroup, checkpoint, origin->Top(), checkradius, checklist); - checkpoint.z = checkradius; + checkpoint.z = checkradius == -1? origin->radius : checkradius; basegroup = origin->Sector->PortalGroup; Reset(); }