Restore default cfg before execute new!

Restore default cfg before execute new!
This commit is contained in:
Very Strange Karaulov 2021-02-10 11:09:30 +03:00 committed by GitHub
parent a4e929eedc
commit 83ededb3cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,6 +264,14 @@ void CoreConfig::ExecuteMapConfig()
char *mapPrefix;
ke::SafeSprintf(cfgPath, sizeof(cfgPath), "%s/%s%s/default.cfg", g_mod_name.chars(), configsDir, MapConfigDir);
if (g_LibSys.IsPathFile(cfgPath))
{
ke::SafeSprintf(command, sizeof(command), CommandFormat, cfgPath);
SERVER_COMMAND(command);
}
if ((mapPrefix = strtok(mapName, "_")))
{
ke::SafeSprintf(cfgPath, sizeof(cfgPath), "%s/%s%s/prefix_%s.cfg", g_mod_name.chars(), configsDir, MapConfigDir, mapPrefix);