]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_superspec.qc
Merge branch 'master' into TimePath/global_self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_superspec.qc
index e7bb9d0182d690438cf9e59b48d556ee13d780b6..32e81319dfe87dda5d6eeaa680aed00836bd77ae 100644 (file)
@@ -388,15 +388,18 @@ MUTATOR_HOOKFUNCTION(superspec_SV_ParseClientCommand)
                        return true;
 
                entity _player;
-               float _team = 0;
-               float found = false;
+               int _team = 0;
+               bool found = false;
 
                if(cmd_argc == 2)
                {
-                       if(argv(1) == "red")
-                               _team = NUM_TEAM_1;
-                       else
-                               _team = NUM_TEAM_2;
+                       switch(argv(1))
+                       {
+                               case "red": _team = NUM_TEAM_1; break;
+                               case "blue": _team = NUM_TEAM_2; break;
+                               case "yellow": if(ctf_teams >= 3) _team = NUM_TEAM_3; break;
+                               case "pink": if(ctf_teams >= 4) _team = NUM_TEAM_4; break;
+                       }
                }
 
                FOR_EACH_PLAYER(_player)