]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
ClientKill_TeamChange: target team -2 now means spectator
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 5ff519bd70695e15627a7680d7342b2ef9f441d7..0de9785d3a45332d6676ccf7f3a7d8e61dadb3b7 100644 (file)
@@ -1229,6 +1229,8 @@ void ClientKill_Now_TeamChange()
                self.team = -1;
                JoinBestTeam( self, FALSE, FALSE );
        }
+       else if(self.killindicator_teamchange == -2)
+               PutObserverInServer();
        else
                SV_ChangeTeam(self.killindicator_teamchange - 1);
 }
@@ -1275,6 +1277,8 @@ void KillIndicator_Think()
                        {
                                if(self.owner.killindicator_teamchange == -1)
                                        centerprint(self.owner, strcat("Changing team in ", ftos(self.cnt), " seconds"));
+                               else if(self.owner.killindicator_teamchange == -2)
+                                       centerprint(self.owner, strcat("Spectating in ", ftos(self.cnt), " seconds"));
                                else
                                        centerprint(self.owner, strcat("Changing to ", ColoredTeamName(self.owner.killindicator_teamchange), " in ", ftos(self.cnt), " seconds"));
                        }
@@ -1286,7 +1290,7 @@ void KillIndicator_Think()
        }
 }
 
-void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto
+void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2 = spec
 {
        float killtime;
        entity e;