From: Rudolf Polzer Date: Sat, 11 Dec 2010 19:31:16 +0000 (+0100) Subject: ClientKill_TeamChange: target team -2 now means spectator X-Git-Tag: xonotic-v0.1.0preview~59 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b55288f3d318b8d08eabf55d2bcacae4a511ab35;p=xonotic%2Fxonotic-data.pk3dir.git ClientKill_TeamChange: target team -2 now means spectator --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 5ff519bd7..0de9785d3 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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;