From 03d652ec7950e3fe07df538c9f572e4089d68de5 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 27 Dec 2011 16:34:41 +0100 Subject: [PATCH] settemp: simplify a bit more --- defaultXonotic.cfg | 15 ++++++++++++--- qcsrc/menu/gamecommand.qc | 6 ------ qcsrc/menu/gamecommand.qh | 1 - qcsrc/menu/menu.qc | 1 - 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 692d9f048..af2ad3953 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/menu/gamecommand.qc b/qcsrc/menu/gamecommand.qc index ea2e4034e..6a140f4fc 100644 --- a/qcsrc/menu/gamecommand.qc +++ b/qcsrc/menu/gamecommand.qc @@ -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) { diff --git a/qcsrc/menu/gamecommand.qh b/qcsrc/menu/gamecommand.qh index 33eb05371..7a18fe2de 100644 --- a/qcsrc/menu/gamecommand.qh +++ b/qcsrc/menu/gamecommand.qh @@ -1,2 +1 @@ -void GameCommand_Init(); void GameCommand(string command); diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 640581b9a..594844117 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -116,7 +116,6 @@ void m_init_delayed() if(!preMenuInit()) return; menuInitialized = 1; - GameCommand_Init(); RegisterWeapons(); -- 2.39.2