Moved the PointInSector functions into FLevelLocals

This commit is contained in:
Christoph Oelckers 2019-01-29 01:30:41 +01:00
commit 60873bc5d6
38 changed files with 167 additions and 162 deletions

View file

@ -1115,7 +1115,7 @@ bool FLevelLocals::CollectConnectedGroups(int startgroup, const DVector3 &positi
}
if (out.method != FPortalGroupArray::PGA_NoSectorPortals)
{
sector_t *sec = P_PointInSector(position);
sector_t *sec = PointInSector(position);
sector_t *wsec = sec;
while (!wsec->PortalBlocksMovement(sector_t::ceiling) && upperz > wsec->GetPortalPlaneZ(sector_t::ceiling))
{
@ -1124,7 +1124,7 @@ bool FLevelLocals::CollectConnectedGroups(int startgroup, const DVector3 &positi
if (processMask.getBit(othergroup)) break;
processMask.setBit(othergroup);
out.Add(othergroup | FPortalGroupArray::UPPER);
wsec = P_PointInSector(pos); // get upper sector at the exact spot we want to check and repeat
wsec = PointInSector(pos); // get upper sector at the exact spot we want to check and repeat
retval = true;
}
wsec = sec;
@ -1135,7 +1135,7 @@ bool FLevelLocals::CollectConnectedGroups(int startgroup, const DVector3 &positi
if (processMask.getBit(othergroup)) break;
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
wsec = PointInSector(pos); // get lower sector at the exact spot we want to check and repeat
retval = true;
}
if (out.method == FPortalGroupArray::PGA_Full3d && PortalBlockmap.hasLinkedSectorPortals)