]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Since killindicator is shared use CPID_TEAMCHANGE when suiciding too, and be sure...
authorterencehill <piuntn@gmail.com>
Tue, 28 Jun 2011 14:24:32 +0000 (16:24 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 28 Jun 2011 14:24:32 +0000 (16:24 +0200)
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc

index 9035a974f15b50a867459d1126d1f7223eca66f0..ffb0d0faac00af09e851a2e2786b959ad50aeed4 100644 (file)
@@ -614,7 +614,7 @@ float MAX_SHOT_DISTANCE = 32768;
 
 //centerprint ID list
 float CPID_TEAMCHANGE = 1;
-float CPID_KILL = 2;
+
 float CPID_MINSTA_FINDAMMO = 3;
 float CPID_NIX_WPNCHANGE = 4;
 float CPID_DISCONNECT_IDLING = 5;
index a3a951b88056fbf3b1d264a73f6f2a9cb185fd99..38a529866635405e5a8ae569a230baf8fdfcb8b8 100644 (file)
@@ -1392,24 +1392,28 @@ void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto, -2
                {
                        self.killindicator.colormod = '0 0 0';
                        if(clienttype(self) == CLIENTTYPE_REAL)
-                               Send_CSQC_Centerprint_Generic(self, CPID_KILL, "^1Suicide in %d seconds", 1, self.killindicator.cnt);
+                       if(self.killindicator.cnt > 0)
+                               Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "^1Suicide in %d seconds", 1, self.killindicator.cnt);
                }
                else if(targetteam == -1) // auto
                {
                        self.killindicator.colormod = '0 1 0';
                        if(clienttype(self) == CLIENTTYPE_REAL)
+                       if(self.killindicator.cnt > 0)
                                Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Changing team in %d seconds", 1, self.killindicator.cnt);
                }
                else if(targetteam == -2) // spectate
                {
                        self.killindicator.colormod = '0.5 0.5 0.5';
                        if(clienttype(self) == CLIENTTYPE_REAL)
+                       if(self.killindicator.cnt > 0)
                                Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Spectating in %d seconds", 1, self.killindicator.cnt);
                }
                else
                {
                        self.killindicator.colormod = TeamColor(targetteam);
                        if(clienttype(self) == CLIENTTYPE_REAL)
+                       if(self.killindicator.cnt > 0)
                                Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, strcat("Changing to ", ColoredTeamName(targetteam), " in %d seconds"), 1, self.killindicator.cnt);
                }
        }