- fixed: Stepping through a ceiling portal on a two-sided line did not work.

- fixed: Stepping up an actor checked against the sector's own ceiling, even if it was a crossable portal.
This commit is contained in:
Christoph Oelckers 2016-12-08 10:16:22 +01:00
parent 6adcba3c4b
commit 66d287ea81

View file

@ -860,6 +860,20 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
FLineOpening open; FLineOpening open;
P_LineOpening(open, tm.thing, ld, ref, &cres.Position, cres.portalflags); 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.portalstep = true;
return true;
}
}
}
// [RH] Steep sectors count as dropoffs, if the actor touches the boundary between a steep slope and something else // [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) && if (!(tm.thing->flags & MF_DROPOFF) &&
@ -2130,7 +2144,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
goto pushline; goto pushline;
} }
else if (BlockingMobj->Top() - thing->Z() > thing->MaxStepHeight else if (BlockingMobj->Top() - thing->Z() > thing->MaxStepHeight
|| (BlockingMobj->Sector->ceilingplane.ZatPoint(pos) - (BlockingMobj->Top()) < thing->Height) || ((BlockingMobj->Sector->ceilingplane.ZatPoint(pos) - (BlockingMobj->Top()) < thing->Height) && BlockingMobj->Sector->PortalBlocksMovement(sector_t::ceiling))
|| (tm.ceilingz - (BlockingMobj->Top()) < thing->Height)) || (tm.ceilingz - (BlockingMobj->Top()) < thing->Height))
{ {
goto pushline; goto pushline;