- Added Gez's submission for Eternity-style skybox definitions.

SVN r2151 (trunk)
This commit is contained in:
Christoph Oelckers 2010-02-06 15:31:26 +00:00
commit 4310b239f4
8 changed files with 316 additions and 25 deletions

View file

@ -3418,8 +3418,24 @@ void P_SetupLevel (char *lumpname, int position)
else
{
// We need translators only for Doom format maps.
// If none has been defined in a map use the game's default.
P_LoadTranslator(!level.info->Translator.IsEmpty()? level.info->Translator.GetChars() : gameinfo.translator.GetChars());
const char *translator;
if (!level.info->Translator.IsEmpty())
{
// The map defines its own translator.
translator = level.info->Translator.GetChars();
}
else
{
// Has the user overridden the game's default translator with a commandline parameter?
translator = Args->CheckValue("-xlat");
if (translator == NULL)
{
// Use the game's default.
translator = gameinfo.translator.GetChars();
}
}
P_LoadTranslator(translator);
}
CheckCompatibility(map);
@ -3561,17 +3577,23 @@ void P_SetupLevel (char *lumpname, int position)
}
else if (!map->isText) // regular nodes are not supported for text maps
{
times[7].Clock();
P_LoadSubsectors (map);
times[7].Unclock();
// If all 3 node related lumps are empty there's no need to output a message.
// This just means that the map has no nodes and the engine is supposed to build them.
if (map->Size(ML_SEGS) != 0 || map->Size(ML_SSECTORS) != 0 || map->Size(ML_NODES) != 0)
{
times[7].Clock();
P_LoadSubsectors (map);
times[7].Unclock();
times[8].Clock();
if (!ForceNodeBuild) P_LoadNodes (map);
times[8].Unclock();
times[8].Clock();
if (!ForceNodeBuild) P_LoadNodes (map);
times[8].Unclock();
times[9].Clock();
if (!ForceNodeBuild) P_LoadSegs (map);
times[9].Unclock();
times[9].Clock();
if (!ForceNodeBuild) P_LoadSegs (map);
times[9].Unclock();
}
else ForceNodeBuild = true;
}
else ForceNodeBuild = true;
}