]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
settemp: simplify a bit more
authorRudolf Polzer <divverent@xonotic.org>
Tue, 27 Dec 2011 15:34:41 +0000 (16:34 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 27 Dec 2011 15:38:18 +0000 (16:38 +0100)
defaultXonotic.cfg
qcsrc/menu/gamecommand.qc
qcsrc/menu/gamecommand.qh
qcsrc/menu/menu.qc

index 692d9f0483e729e19d72bffd3ab05e50dc35d0f5..af2ad395302957d0a65a4c3fd3e0cb9a1b025342 100644 (file)
@@ -38,6 +38,16 @@ alias if_dedicated "${* asis}"
 _if_dedicated alias if_client ""
 if_client alias if_dedicated ""
 
+if_dedicated "alias" qc_cmd_svmenu "sv_cmd $$*"
+if_client    "alias" qc_cmd_svmenu "menu_cmd $$*"
+if_dedicated "alias" qc_cmd_svcl   "sv_cmd $$*"
+if_client    "alias" qc_cmd_svcl   "cl_cmd $$*"
+if_dedicated "alias" qc_cmd_svcmd  "sv_cmd $$*"
+if_client    "alias" qc_cmd_svcmd  "cmd $$*"
+
+// shorthand for the most usual case
+alias qc_cmd "qc_cmd_svmenu $*"
+
 seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
 // say aliases
@@ -1326,7 +1336,6 @@ seta g_waypointsprites_turrets 1 "disable turret waypoints"
 seta g_waypointsprites_turrets_maxdist 4000 "max distace for turret sprites"
 
 // command extension
-alias qc_cmd   "sv_cmd $*" // menu QC will override this to menu_cmd
 alias adminmsg "sv_cmd adminmsg $*"
 alias teamstatus       "cmd teamstatus; sv_cmd teamstatus" // yes, it is broken on listen servers that way, but well, who cares :P
 alias printstats       "sv_cmd printstats" // print status on demand
@@ -1400,8 +1409,8 @@ alias unban "sv_cmd unban $*"     // usage: unban 3 (number from bans)
 r_labelsprites_scale 0.40625 // labels sprites get displayed at 0.5x from 640x480 to 1280x1024, and at 1x from 1600x1200 onwards
 
 // settemp subsystem. Do not touch. Usage: settemp variable value, next map resets it.
-alias settemp "cl_cmd settemp $*"
-alias settemp_restore "cl_cmd settemp_restore"
+alias settemp "qc_cmd_svcl settemp $$*"
+alias settemp_restore "qc_cmd_svcl settemp_restore"
 
 // usercommands. These can be edited and bound by the menu.
 seta "userbind1_press" "say_team quad soon";  seta "userbind1_release" "";  seta "userbind1_description" "team: quad soon"
index ea2e4034eb08fadb820ea319ae2e6fa17fca8401..6a140f4fc87b6daf8eadb908f876b2473cbbbd61 100644 (file)
@@ -1,9 +1,3 @@
-void GameCommand_Init()
-{
-       // make gg call menu QC theCommands
-       localcmd("alias qc_cmd \"menu_cmd $*\"\n");
-}
-
 string _dumptree_space;
 void _dumptree_open(entity pass, entity me)
 {
index 33eb053714c1d2ff68490d79ac8c88a2c592eb04..7a18fe2def40683da35241f8b6bf53a04429d68d 100644 (file)
@@ -1,2 +1 @@
-void GameCommand_Init();
 void GameCommand(string command);
index 640581b9a49f348fb5594efb74a032a7477b3b42..594844117c1afc7ee50bc9e929276f67a9e00f40 100644 (file)
@@ -116,7 +116,6 @@ void m_init_delayed()
        if(!preMenuInit())
                return;
        menuInitialized = 1;
-       GameCommand_Init();
 
        RegisterWeapons();