mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-22 16:31:23 +00:00
restored GZDoom's console alias code.
This got changed in Raze's early development when it was still using the EDuke32 console and later not changed back.
This commit is contained in:
parent
e5d6296581
commit
4b6646da03
1 changed files with 13 additions and 5 deletions
|
@ -372,13 +372,21 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
||||||
{
|
{
|
||||||
ReadCVars (0);
|
ReadCVars (0);
|
||||||
}
|
}
|
||||||
strncpy (subsection, "ConsoleAliases", sublen);
|
strncpy(subsection, "ConsoleAliases", sublen);
|
||||||
if (SetSection (section))
|
if (SetSection(section))
|
||||||
{
|
{
|
||||||
while (NextInSection (key, value))
|
const char* name = NULL;
|
||||||
|
while (NextInSection(key, value))
|
||||||
{
|
{
|
||||||
FStringf cmd("alias %s \"%s\"", key, value);
|
if (stricmp(key, "Name") == 0)
|
||||||
C_DoCommand(cmd.GetChars());
|
{
|
||||||
|
name = value;
|
||||||
|
}
|
||||||
|
else if (stricmp(key, "Command") == 0 && name != NULL)
|
||||||
|
{
|
||||||
|
C_SetAlias(name, value);
|
||||||
|
name = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue