mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
- added a check to detect self-referencing sectors in the portal setup code because those are problem cases.
This commit is contained in:
parent
f24bf7e622
commit
b9037ef3ee
2 changed files with 18 additions and 2 deletions
|
@ -78,7 +78,7 @@ struct FCheckPosition
|
||||||
bool DoRipping;
|
bool DoRipping;
|
||||||
TMap<AActor*, bool> LastRipped;
|
TMap<AActor*, bool> LastRipped;
|
||||||
|
|
||||||
//FPortalGroupTable Groups;
|
FPortalGroupTable Groups;
|
||||||
int PushTime;
|
int PushTime;
|
||||||
|
|
||||||
FCheckPosition(bool rip=false)
|
FCheckPosition(bool rip=false)
|
||||||
|
|
|
@ -973,7 +973,23 @@ void P_CreateLinkedPortals()
|
||||||
Printf("Link offset mismatch between sectors %d and %d\n", sec1, sec2);
|
Printf("Link offset mismatch between sectors %d and %d\n", sec1, sec2);
|
||||||
bogus = true;
|
bogus = true;
|
||||||
}
|
}
|
||||||
// todo: Find sectors that have no group but belong to a portal.
|
// mark everything that connects to a one-sided line
|
||||||
|
for (int i = 0; i < numlines; i++)
|
||||||
|
{
|
||||||
|
if (lines[i].backsector == NULL && lines[i].frontsector->PortalGroup == 0)
|
||||||
|
{
|
||||||
|
CollectSectors(-1, lines[i].frontsector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// and now print a message for everything that still wasn't processed.
|
||||||
|
for (int i = 0; i < numsectors; i++)
|
||||||
|
{
|
||||||
|
if (sectors[i].PortalGroup == 0)
|
||||||
|
{
|
||||||
|
Printf("Unable to assign sector %d to any group. Possibly self-referencing\n", i);
|
||||||
|
}
|
||||||
|
else if (sectors[i].PortalGroup == -1) sectors[i].PortalGroup = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bogus |= ConnectGroups();
|
bogus |= ConnectGroups();
|
||||||
|
|
Loading…
Reference in a new issue