mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- added a check for unconnected linked line portals.
This commit is contained in:
parent
f0d40d6a8a
commit
b346dd0c09
1 changed files with 11 additions and 2 deletions
|
@ -1027,8 +1027,17 @@ void P_CreateLinkedPortals()
|
|||
{
|
||||
if (linePortals[i].mType == PORTT_LINKED)
|
||||
{
|
||||
if (CollectSectors(id, linePortals[i].mOrigin->frontsector)) id++;
|
||||
if (CollectSectors(id, linePortals[i].mDestination->frontsector)) id++;
|
||||
if (linePortals[i].mDestination == nullptr)
|
||||
{
|
||||
Printf("Linked portal on line %d is unconnected and will be disabled\n", linePortals[i].mOrigin->Index());
|
||||
linePortals[i].mOrigin->portalindex = UINT_MAX;
|
||||
linePortals[i].mType = PORTT_VISUAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CollectSectors(id, linePortals[i].mOrigin->frontsector)) id++;
|
||||
if (CollectSectors(id, linePortals[i].mDestination->frontsector)) id++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue