]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2267 "Teams get shuffled every round in CA and FT" (whenever a sv_cmd command...
authorterencehill <piuntn@gmail.com>
Mon, 19 Aug 2019 23:57:51 +0000 (01:57 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 19 Aug 2019 23:57:51 +0000 (01:57 +0200)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc

index 0a8370899dea2bce50728c5f674b623240e446e9..cf2821844aa01666e3b3fb2a62df7b0d900cefc5 100644 (file)
@@ -508,6 +508,8 @@ MUTATOR_HOOKFUNCTION(ca, SetWeaponArena)
 
 MUTATOR_HOOKFUNCTION(ca, SV_ParseServerCommand)
 {
-       shuffleteams_on_reset_map = !allowed_to_spawn;
+       string cmd_name = M_ARGV(0, string);
+       if (cmd_name == "shuffleteams")
+               shuffleteams_on_reset_map = !allowed_to_spawn;
        return false;
 }
index 2dfcf48112447ad1a5411a60b3c5f925e567b3b2..0f37cf1e8fa4673c4c77e3553d6b55d84fd08557 100644 (file)
@@ -612,7 +612,9 @@ MUTATOR_HOOKFUNCTION(ft, FragCenterMessage)
 
 MUTATOR_HOOKFUNCTION(ft, SV_ParseServerCommand)
 {
-       shuffleteams_on_reset_map = !(round_handler_IsActive() && !round_handler_IsRoundStarted());
+       string cmd_name = M_ARGV(0, string);
+       if (cmd_name == "shuffleteams")
+               shuffleteams_on_reset_map = !(round_handler_IsActive() && !round_handler_IsRoundStarted());
        return false;
 }