mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- 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:
parent
6adcba3c4b
commit
66d287ea81
1 changed files with 15 additions and 1 deletions
|
@ -860,6 +860,20 @@ 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.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) &&
|
||||
|
@ -2130,7 +2144,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
|||
goto pushline;
|
||||
}
|
||||
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))
|
||||
{
|
||||
goto pushline;
|
||||
|
|
Loading…
Reference in a new issue