diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 08050133a..cec3b1c50 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 60d94e4b4..1f32d6faa 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(); }