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 0a83708..cf28218 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 2dfcf48..0f37cf1 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;
 }