]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix spectator team assignment.
authorLyberta <lyberta@lyberta.net>
Sat, 16 Jun 2018 11:56:18 +0000 (14:56 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 16 Jun 2018 11:56:18 +0000 (14:56 +0300)
qcsrc/server/teamplay.qc

index 3f125131043a8c341e59a0280ebd494b661e2be8..5b9ab4db5faf240bcc887d156f083359521a19c1 100644 (file)
@@ -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);
        }