mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- fixed: P_CollectConnectedGroups should abort if it tries to collect the same portal group more than once, because this would indicate an infinite loop.
This commit is contained in:
parent
1767dd6a42
commit
0f80b7dcb6
1 changed files with 2 additions and 0 deletions
|
@ -1246,6 +1246,7 @@ bool P_CollectConnectedGroups(int startgroup, const DVector3 &position, double u
|
|||
{
|
||||
int othergroup = wsec->GetOppositePortalGroup(sector_t::ceiling);
|
||||
DVector2 pos = Displacements.getOffset(startgroup, othergroup) + position;
|
||||
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
|
||||
|
@ -1256,6 +1257,7 @@ bool P_CollectConnectedGroups(int startgroup, const DVector3 &position, double u
|
|||
{
|
||||
int othergroup = wsec->GetOppositePortalGroup(sector_t::floor);
|
||||
DVector2 pos = Displacements.getOffset(startgroup, othergroup) + position;
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue