diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp index 87fdb01834..c99c6bc01c 100644 --- a/source/core/gameconfigfile.cpp +++ b/source/core/gameconfigfile.cpp @@ -372,13 +372,21 @@ void FGameConfigFile::DoGameSetup (const char *gamename) { ReadCVars (0); } - strncpy (subsection, "ConsoleAliases", sublen); - if (SetSection (section)) + strncpy(subsection, "ConsoleAliases", sublen); + if (SetSection(section)) { - while (NextInSection (key, value)) + const char* name = NULL; + while (NextInSection(key, value)) { - FStringf cmd("alias %s \"%s\"", key, value); - C_DoCommand(cmd.GetChars()); + if (stricmp(key, "Name") == 0) + { + name = value; + } + else if (stricmp(key, "Command") == 0 && name != NULL) + { + C_SetAlias(name, value); + name = NULL; + } } } }