From: Martin Taibr Date: Sat, 29 Sep 2018 14:28:54 +0000 (+0200) Subject: only exec help.cfg once X-Git-Tag: xonotic-v0.8.5~1814^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=32187677b67c9f4c3f302ef6ff98ba236839b145;p=xonotic%2Fxonotic-data.pk3dir.git only exec help.cfg once --- diff --git a/help.cfg b/help.cfg index 69bec7c75..21b7afb63 100644 --- a/help.cfg +++ b/help.cfg @@ -14,11 +14,11 @@ set help_cfg_time 5 set help_cfg_prefix "^2" // aliases making up the actual helpsystem -set help_tmp_index 0 // TODO this will get reset with every game on ruleset-votable servers (https://gitlab.com/xonotic/xonotic-data.pk3dir/issues/1973) +set help_tmp_index -1 // -1 since we first increment, then show it alias help_say "set help_tmp_oldnick \"$sv_adminnick\"; set sv_adminnick \"$help_cfg_nick\"; say \"$*\"; help_say2" alias help_say2 "set sv_adminnick \"$help_tmp_oldnick\"" alias help_doit "sv_cmd rpn /help_tmp_msg help_msg_$help_tmp_index def; help_doit2" alias help_doit2 "help_say $help_cfg_prefix$help_tmp_msg" alias help_inc "sv_cmd rpn /help_tmp_index help_tmp_index 1 add $help_msg_count mod def" -alias help_next "help_doit; help_inc" +alias help_next "help_inc; help_doit" // increment first - if the ruleset changed, the number of tips could have too, this avoids overflow alias help_loop "help_next; defer $help_cfg_time help_loop" diff --git a/xonotic-common.cfg b/xonotic-common.cfg index 078fbed74..3a01784c7 100644 --- a/xonotic-common.cfg +++ b/xonotic-common.cfg @@ -145,3 +145,6 @@ exec commands.cfg // Change g_start_delay based upon if the server is local or not. if_client set g_start_delay 0 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server" if_dedicated set g_start_delay 15 "delay before the game starts, so everyone can join; recommended to set this to like 15 on a public server" + +// this should be execed only once even on ruleset-votable servers, otherwise the tips would always start from 0 +if_dedicated exec help.cfg diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 83e6bd262..d0d2c0b19 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -549,7 +549,6 @@ exec mutators.cfg exec monsters.cfg exec minigames.cfg exec physics.cfg -exec help.cfg exec help-xonotic.cfg set sv_join_notices ""