]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Fix spectator team assignment.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 22ea235463b949c92ce7cb109abc2afd437bd2d2..5b9ab4db5faf240bcc887d156f083359521a19c1 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "command/vote.qh"
 
-#include "mutators/_mod.qh"
+#include <server/mutators/_mod.qh>
 
 #include "../common/deathtypes/all.qh"
 #include <common/gamemodes/_mod.qh>
@@ -185,7 +185,11 @@ bool Player_SetTeamIndex(entity player, int index)
                // Mutator has blocked team change.
                return false;
        }
-       if (new_team != -1)
+       if (new_team == -1)
+       {
+               player.team = -1;
+       }
+       else
        {
                SetPlayerColors(player, new_team - 1);
        }