- changed: Maps with missing first sidedefs no longer abort. THey now print a console warning and use the first sidedef in the map.

SVN r2344 (trunk)
This commit is contained in:
Christoph Oelckers 2010-05-29 09:11:12 +00:00
commit cd1104e80c
2 changed files with 21 additions and 4 deletions

View file

@ -1967,8 +1967,14 @@ void P_LoadLineDefs (MapData * map)
}
else
{
if (LittleShort(mld->sidenum[0]) != NO_INDEX)
sidecount++;
// 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)
{
Printf("Line %d has no first side.\n", i);
mld->sidenum[0] = 0;
}
sidecount++;
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
sidecount++;
linemap[i] = i+skipped;
@ -2037,8 +2043,14 @@ void P_LoadLineDefs2 (MapData * map)
}
else
{
if (LittleShort(mld->sidenum[0]) != NO_INDEX)
sidecount++;
// 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)
{
Printf("Line %d has no first side.\n", i);
mld->sidenum[0] = 0;
}
sidecount++;
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
sidecount++;
linemap[i] = i+skipped;