]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - help.cfg
only exec help.cfg once
[xonotic/xonotic-data.pk3dir.git] / help.cfg
index 69bec7c750832e16699013150441ea4f94ad54dc..21b7afb630802a5b96bbcb697edc47bd759916a7 100644 (file)
--- 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"