- fixed the check for one-subsector BSPs.

This commit is contained in:
Christoph Oelckers 2017-03-18 22:44:03 +01:00
parent 3cced6c7cc
commit 2c7ceaf96a
2 changed files with 2 additions and 2 deletions

View file

@ -118,7 +118,7 @@ struct FLevelLocals
node_t *HeadNode() const
{
return &nodes[nodes.Size() - 1];
return nodes.Size() == 0? nullptr : &nodes[nodes.Size() - 1];
}
node_t *HeadGamenode() const
{

View file

@ -3957,7 +3957,7 @@ void P_SetupLevel (const char *lumpname, int position)
}
// set the head node for gameplay purposes. If the separate gamenodes array is not empty, use that, otherwise use the render nodes.
level.headgamenode = level.gamenodes.Size() > 0 ? &level.gamenodes[level.gamenodes.Size() - 1] : &level.nodes[level.nodes.Size() - 1];
level.headgamenode = level.gamenodes.Size() > 0 ? &level.gamenodes[level.gamenodes.Size() - 1] : level.nodes.Size()? &level.nodes[level.nodes.Size() - 1] : nullptr;
times[10].Clock();
P_LoadBlockMap (map);