mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fixed: Stepping up through a portal did not work when the step line was two-sided. This special case was only implemented for one-sided lines
- fixed: The portal collector set bad flags for collected lower portals.
This commit is contained in:
parent
1e950d75bd
commit
12f0b56036
2 changed files with 22 additions and 2 deletions
|
@ -860,6 +860,26 @@ 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.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
|
// [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) &&
|
||||||
|
|
|
@ -1231,8 +1231,8 @@ bool P_CollectConnectedGroups(int startgroup, const DVector3 &position, double u
|
||||||
{
|
{
|
||||||
int othergroup = wsec->GetOppositePortalGroup(sector_t::floor);
|
int othergroup = wsec->GetOppositePortalGroup(sector_t::floor);
|
||||||
DVector2 pos = Displacements.getOffset(startgroup, othergroup) + position;
|
DVector2 pos = Displacements.getOffset(startgroup, othergroup) + position;
|
||||||
processMask.setBit(othergroup | FPortalGroupArray::LOWER);
|
processMask.setBit(othergroup);
|
||||||
out.Add(othergroup);
|
out.Add(othergroup | FPortalGroupArray::LOWER);
|
||||||
wsec = P_PointInSector(pos); // get lower sector at the exact spot we want to check and repeat
|
wsec = P_PointInSector(pos); // get lower sector at the exact spot we want to check and repeat
|
||||||
retval = true;
|
retval = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue