mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 11:30:44 +00:00
- validate 'nextsector' fields on walls.
Build utterly relied on the map having these right and put the entire responsibility on the mapper. There's maps, however which have bad values here causing either render glitches or crashes so these bad indices need to be fixed. Two good examples where this causes problems are RR's E3L1 and the second map of SW's Last Warrior mod where this even glitches in Polymost.
This commit is contained in:
parent
9a8ee00aec
commit
bd23ea144c
1 changed files with 14 additions and 0 deletions
|
@ -493,4 +493,18 @@ void setWallSectors()
|
|||
wall[sector[i].wallptr + w].sector = i;
|
||||
}
|
||||
}
|
||||
|
||||
// validate 'nextsector' fields. Some maps have these wrong which can cause render glitches and occasionally even crashes.
|
||||
for (int i = 0; i < numwalls; i++)
|
||||
{
|
||||
if (wall[i].nextwall != -1)
|
||||
{
|
||||
if (wall[i].nextsector != wall[wall[i].nextwall].sector)
|
||||
{
|
||||
DPrintf(DMSG_ERROR, "Bad 'nextsector' reference %d on wall %d\n", wall[i].nextsector, i);
|
||||
wall[i].nextsector = wall[wall[i].nextwall].sector;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue