mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- streamlined and fixed game startup with '-map' option.
* Blood: Initialize global pointers in app_init so that they are not NULL. * consider Mapinfo data when checking for a given level name. * removed redundant level name output.
This commit is contained in:
parent
63bc36e3c4
commit
0f7d3d0cbb
2 changed files with 9 additions and 8 deletions
|
@ -454,19 +454,18 @@ void UserConfig::ProcessOptions()
|
|||
void CheckUserMap()
|
||||
{
|
||||
if (userConfig.CommandMap.IsEmpty()) return;
|
||||
if (FindMapByName(userConfig.CommandMap))
|
||||
{
|
||||
return; // we already got a record for this map so no need for further checks.
|
||||
}
|
||||
FString startupMap = userConfig.CommandMap;
|
||||
if (startupMap.IndexOfAny("/\\") < 0) startupMap.Insert(0, "/");
|
||||
DefaultExtension(startupMap, ".map");
|
||||
startupMap.Substitute("\\", "/");
|
||||
NormalizeFileName(startupMap);
|
||||
|
||||
if (fileSystem.FileExists(startupMap))
|
||||
if (!fileSystem.FileExists(startupMap))
|
||||
{
|
||||
Printf("Using level: \"%s\".\n", startupMap.GetChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("Level \"%s\" not found.\n", startupMap.GetChars());
|
||||
Printf(PRINT_HIGH, "Level \"%s\" not found.\n", startupMap.GetChars());
|
||||
startupMap = "";
|
||||
}
|
||||
userConfig.CommandMap = startupMap;
|
||||
|
|
|
@ -453,11 +453,13 @@ void GameInterface::app_init()
|
|||
UpdateDacs(0, true);
|
||||
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;
|
||||
|
||||
gViewIndex = myconnectindex;
|
||||
gMe = gView = &gPlayer[myconnectindex];
|
||||
}
|
||||
|
||||
static void gameInit()
|
||||
{
|
||||
//RESTART:
|
||||
gViewIndex = myconnectindex;
|
||||
gMe = gView = &gPlayer[myconnectindex];
|
||||
|
||||
|
|
Loading…
Reference in a new issue