[nexuiz-commits] r6456 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Apr 7 09:13:04 EDT 2009


Author: div0
Date: 2009-04-07 09:13:04 -0400 (Tue, 07 Apr 2009)
New Revision: 6456

Modified:
   trunk/data/qcsrc/server/cl_client.qc
Log:
use -1 as team numbers for spectators (PLEASE TEST)


Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2009-04-07 12:01:08 UTC (rev 6455)
+++ trunk/data/qcsrc/server/cl_client.qc	2009-04-07 13:13:04 UTC (rev 6456)
@@ -565,6 +565,8 @@
 	self.oldvelocity = self.velocity;
 	self.customizeentityforclient = Client_customizeentityforclient;
 
+	self.team = -1;
+
 	if(g_arena)
 	{
 		if(self.version_mismatch)
@@ -710,6 +712,9 @@
 	if(self.classname == "player") {
 		entity spot, oldself;
 
+		if(self.team < 0)
+			JoinBestTeam(self, FALSE, TRUE);
+
 		race_PreSpawn();
 
 		spot = SelectSpawnPoint (FALSE);
@@ -978,9 +983,7 @@
 		JoinBestTeam( self, FALSE, FALSE );
 	}
 	else
-	{
 		SV_ChangeTeam(self.killindicator_teamchange - 1);
-	}
 }
 
 void ClientKill_Now()
@@ -1137,7 +1140,7 @@
 		if(destteam == -1)
 			return;
 	}
-	if(destteam == self.team && !self.killindicator)
+	if(destteam == self.team && destteam >= 0 && !self.killindicator)
 		return;
 	ClientKill_TeamChange(destteam);
 }



More information about the nexuiz-commits mailing list