- fixed validation issue with maps that have a wall with nextwall == -1 and nextsector > -1.

In this case the bogus nextsector was not reset.
This commit is contained in:
Christoph Oelckers 2022-02-15 22:47:53 +01:00
parent 21fddd6c54
commit de1cbb9ee0
2 changed files with 7 additions and 4 deletions

View file

@ -140,8 +140,7 @@ void vertexscan(walltype* startwall, func mark)
{
auto thelastwall = wal->lastWall();
// thelastwall can be null here if the map is bogus.
if (!thelastwall || !thelastwall->twoSided()) break;
if (!thelastwall || thelastwall->nextwall < 0) break;
wal = thelastwall->nextWall();
if (walbitmap.Check(wall.IndexOf(wal))) break;
mark(wal);

View file

@ -831,7 +831,11 @@ void setWallSectors()
wal.nextsector = wal.nextWall()->sector;
}
}
else wal.nextwall = -1;
else
{
wal.nextwall = -1;
wal.nextsector = -1;
}
}
}