Skip to content

Commit

Permalink
- disabled the non-functional sidedef range check.
Browse files Browse the repository at this point in the history
Due to how sidedefs are decompressed this must not be checked in the linedef loader.
  • Loading branch information
coelckers committed Jun 12, 2020
1 parent 476ab9c commit 8e46f23
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/maploader/maploader.cpp
Expand Up @@ -1675,7 +1675,6 @@ 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
Expand Down Expand Up @@ -1742,14 +1741,6 @@ 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)
Expand Down

0 comments on commit 8e46f23

Please sign in to comment.