mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
Revert "- disabled the non-functional sidedef range check."
This reverts commit 8e46f235a6
.
This commit is contained in:
parent
91a21e9cf1
commit
2f692e1f7b
1 changed files with 9 additions and 0 deletions
|
@ -1675,6 +1675,7 @@ void MapLoader::LoadLineDefs (MapData * map)
|
|||
|
||||
auto mldf = map->Read(ML_LINEDEFS);
|
||||
int numlines = mldf.Size() / sizeof(maplinedef_t);
|
||||
int numsides = map->Size(ML_SIDEDEFS) / sizeof(mapsidedef_t);
|
||||
linemap.Resize(numlines);
|
||||
|
||||
// [RH] Count the number of sidedef references. This is the number of
|
||||
|
@ -1741,6 +1742,14 @@ void MapLoader::LoadLineDefs (MapData * map)
|
|||
}
|
||||
#endif
|
||||
// cph 2006/09/30 - fix sidedef errors right away.
|
||||
for (int j=0; j < 2; j++)
|
||||
{
|
||||
if (LittleShort(mld->sidenum[j]) != NO_INDEX && mld->sidenum[j] >= numsides)
|
||||
{
|
||||
mld->sidenum[j] = 0; // dummy sidedef
|
||||
Printf("Linedef %d has a bad sidedef\n", i);
|
||||
}
|
||||
}
|
||||
// patch missing first sides instead of crashing out.
|
||||
// Visual glitches are better than not being able to play.
|
||||
if (LittleShort(mld->sidenum[0]) == NO_INDEX)
|
||||
|
|
Loading…
Reference in a new issue