MCPcopy Create free account
hub / github.com/ZDoom/Raze / CheckUserMap

Function CheckUserMap

source/core/gamecontrol.cpp:474–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472//==========================================================================
473
474void CheckUserMap()
475{
476 if (userConfig.CommandMap.IsEmpty()) return;
477 if (FindMapByName(userConfig.CommandMap.GetChars()))
478 {
479 return; // we already got a record for this map so no need for further checks.
480 }
481 FString startupMap = userConfig.CommandMap;
482 DefaultExtension(startupMap, ".map");
483 startupMap.Substitute("\\", "/");
484 NormalizeFileName(startupMap);
485
486 if (!fileSystem.FileExists(startupMap.GetChars()))
487 {
488 Printf(PRINT_HIGH, "Level \"%s\" not found.\n", startupMap.GetChars());
489 startupMap = "";
490 }
491 userConfig.CommandMap = startupMap;
492}
493
494//==========================================================================
495//

Callers 1

RunGameFunction · 0.85

Calls 8

FindMapByNameFunction · 0.85
DefaultExtensionFunction · 0.85
NormalizeFileNameFunction · 0.85
PrintfFunction · 0.85
FileExistsMethod · 0.80
IsEmptyMethod · 0.45
GetCharsMethod · 0.45
SubstituteMethod · 0.45

Tested by

no test coverage detected