(svn r6450) -Feature: Make the 'patch' console command available for offline use and for

online use for player-based settings.
This commit is contained in:
Darkvater
2006-09-14 23:26:58 +00:00
parent 2d329463bf
commit dc93d63478
3 changed files with 25 additions and 13 deletions

View File

@@ -1373,7 +1373,12 @@ DEF_CONSOLE_CMD(ConPatch)
IConsoleGetPatchSetting(argv[1]);
} else {
uint32 val;
if (GetArgumentInteger(&val, argv[2])) IConsoleSetPatchSetting(argv[1], val);
if (GetArgumentInteger(&val, argv[2])) {
if (!IConsoleSetPatchSetting(argv[1], val)) {
IConsoleError("This command/variable is only available to a network server.");
}
}
}
return true;
@@ -1459,6 +1464,7 @@ void IConsoleStdLibRegister(void)
IConsoleCmdRegister("cd", ConChangeDirectory);
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
IConsoleCmdRegister("clear", ConClearBuffer);
IConsoleCmdRegister("patch", ConPatch);
IConsoleAliasRegister("dir", "ls");
IConsoleAliasRegister("del", "rm %+");
@@ -1514,8 +1520,6 @@ void IConsoleStdLibRegister(void)
IConsoleCmdRegister("unpause", ConUnPauseGame);
IConsoleCmdHookAdd("unpause", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);
IConsoleCmdRegister("patch", ConPatch);
/*** Networking variables ***/
IConsoleVarRegister("net_frame_freq", &_network_frame_freq, ICONSOLE_VAR_BYTE, "The amount of frames before a command will be (visibly) executed. Default value: 1");
IConsoleVarHookAdd("net_frame_freq", ICONSOLE_HOOK_ACCESS, ConHookServerOnly);