mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- 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:
parent
042e913022
commit
cd1104e80c
2 changed files with 21 additions and 4 deletions
|
@ -1967,7 +1967,13 @@ void P_LoadLineDefs (MapData * map)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LittleShort(mld->sidenum[0]) != NO_INDEX)
|
// 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++;
|
sidecount++;
|
||||||
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
|
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
|
||||||
sidecount++;
|
sidecount++;
|
||||||
|
@ -2037,7 +2043,13 @@ void P_LoadLineDefs2 (MapData * map)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LittleShort(mld->sidenum[0]) != NO_INDEX)
|
// 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++;
|
sidecount++;
|
||||||
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
|
if (LittleShort(mld->sidenum[1]) != NO_INDEX)
|
||||||
sidecount++;
|
sidecount++;
|
||||||
|
|
|
@ -850,6 +850,11 @@ struct UDMFParser
|
||||||
{
|
{
|
||||||
ld->Alpha = FRACUNIT * 3/4;
|
ld->Alpha = FRACUNIT * 3/4;
|
||||||
}
|
}
|
||||||
|
if (ld->sidedef[0] == NULL)
|
||||||
|
{
|
||||||
|
ld->sidedef[0] = (side_t*)(intptr_t)(1);
|
||||||
|
Printf("Line %d has no first side.\n", index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
Loading…
Reference in a new issue