- fixed: When stepping through a sector portal and touching a two sided line on the opposite side, its opening must be used, regardless of the FFCF_NOFLOOR flag.

This commit is contained in:
Christoph Oelckers 2017-08-27 10:36:34 +02:00
parent e424ef63f2
commit 485c4c71b5
3 changed files with 8 additions and 1 deletions

View file

@ -36,6 +36,7 @@ struct FCheckPosition
TMap<AActor*, bool> LastRipped;
bool DoRipping;
bool portalstep;
int portalgroup;
int PushTime;

View file

@ -161,6 +161,7 @@ DEFINE_FIELD_X(FCheckPosition, FCheckPosition, ceilingline);
DEFINE_FIELD_X(FCheckPosition, FCheckPosition, stepthing);
DEFINE_FIELD_X(FCheckPosition, FCheckPosition, DoRipping);
DEFINE_FIELD_X(FCheckPosition, FCheckPosition, portalstep);
DEFINE_FIELD_X(FCheckPosition, FCheckPosition, portalgroup);
DEFINE_FIELD_X(FCheckPosition, FCheckPosition, PushTime);
//==========================================================================
@ -288,6 +289,7 @@ static bool PIT_FindFloorCeiling(FMultiBlockLinesIterator &mit, FMultiBlockLines
}
}
// If we are stepping through a portal the line's opening must be checked, regardless of the NOFLOOR flag
if (!(flags & FFCF_NOFLOOR))
{
if (open.bottom > tmf.floorz)
@ -905,6 +907,7 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
tm.floorpic = cres.line->sidedef[0]->GetTexture(side_t::mid);
tm.floorterrain = 0;
tm.portalstep = true;
tm.portalgroup = cres.line->frontsector->GetOppositePortalGroup(sector_t::ceiling);
return true;
}
}
@ -999,6 +1002,7 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
{
// Actor is stepping through a portal.
tm.portalstep = true;
tm.portalgroup = tm.thing->Sector->GetOppositePortalGroup(sector_t::ceiling);
return true;
}
}
@ -1051,7 +1055,8 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
}
}
if (!(cres.portalflags & FFCF_NOFLOOR))
// If we are stepping through a portal the line's opening must be checked, regardless of the NOFLOOR flag
if (!(cres.portalflags & FFCF_NOFLOOR) || (tm.portalstep && open.bottomsec->PortalGroup == tm.portalgroup))
{
if (open.bottom > tm.floorz)
{

View file

@ -22,6 +22,7 @@ struct FCheckPosition
native Actor stepthing;
native bool DoRipping;
native bool portalstep;
native int portalgroup;
native int PushTime;