diff --git a/src/p_map.cpp b/src/p_map.cpp index 16a5933d5..290b84b9e 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -860,6 +860,26 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec FLineOpening open; P_LineOpening(open, tm.thing, ld, ref, &cres.Position, cres.portalflags); + if (!tm.thing->Sector->PortalBlocksMovement(sector_t::ceiling)) + { + sector_t *oppsec = cres.line->frontsector == tm.thing->Sector ? cres.line->backsector : cres.line->frontsector; + if (oppsec->PortalBlocksMovement(sector_t::ceiling)) + { + double portz = tm.thing->Sector->GetPortalPlaneZ(sector_t::ceiling); + if (tm.thing->Z() < portz && tm.thing->Z() + tm.thing->MaxStepHeight >= portz && tm.floorz < portz) + { + // Actor is stepping through a portal. + /* + tm.floorz = portz; + tm.floorsector = oppsec; + tm.floorpic = cres.line->sidedef[0]->GetTexture(side_t::mid); + tm.floorterrain = 0; + */ + tm.portalstep = true; + return true; + } + } + } // [RH] Steep sectors count as dropoffs, if the actor touches the boundary between a steep slope and something else if (!(tm.thing->flags & MF_DROPOFF) && diff --git a/src/portal.cpp b/src/portal.cpp index f1454cdc6..156643cfb 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -1231,8 +1231,8 @@ bool P_CollectConnectedGroups(int startgroup, const DVector3 &position, double u { int othergroup = wsec->GetOppositePortalGroup(sector_t::floor); DVector2 pos = Displacements.getOffset(startgroup, othergroup) + position; - processMask.setBit(othergroup | FPortalGroupArray::LOWER); - out.Add(othergroup); + processMask.setBit(othergroup); + out.Add(othergroup | FPortalGroupArray::LOWER); wsec = P_PointInSector(pos); // get lower sector at the exact spot we want to check and repeat retval = true; }