mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- fix range check for nextwall in map loader
This commit is contained in:
parent
177e84881e
commit
fee8df8a1b
1 changed files with 2 additions and 1 deletions
|
@ -543,7 +543,7 @@ void setWallSectors()
|
|||
// validate 'nextsector' fields. Some maps have these wrong which can cause render glitches and occasionally even crashes.
|
||||
for (auto& wal : walls())
|
||||
{
|
||||
if (wal.nextwall != -1)
|
||||
if (validWallIndex(wal.nextwall))
|
||||
{
|
||||
if (wal.nextsector != wal.nextWall()->sector)
|
||||
{
|
||||
|
@ -551,6 +551,7 @@ void setWallSectors()
|
|||
wal.nextsector = wal.nextWall()->sector;
|
||||
}
|
||||
}
|
||||
else wal.nextwall = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue