[nexuiz-commits] r7337 - trunk/data/qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 4 15:24:58 EDT 2009


Author: div0
Date: 2009-08-04 15:24:58 -0400 (Tue, 04 Aug 2009)
New Revision: 7337

Modified:
   trunk/data/qcsrc/client/Main.qc
Log:
fix last fix


Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc	2009-08-04 19:14:57 UTC (rev 7336)
+++ trunk/data/qcsrc/client/Main.qc	2009-08-04 19:24:58 UTC (rev 7337)
@@ -176,22 +176,41 @@
 float SetTeam(entity o, float Team)
 {
 	entity tm;
-	switch(Team)
+	if(teamplay)
 	{
-		case -1:
-		case COLOR_TEAM1:
-		case COLOR_TEAM2:
-		case COLOR_TEAM3:
-		case COLOR_TEAM4:
-			break;
-		default:
-			if(GetTeam(Team, false) == NULL)
-			{
-				print("trying to switch to unsupported team ", ftos(Team), "\n");
-				Team = COLOR_SPECTATOR;
-			}
-			break;
+		switch(Team)
+		{
+			case -1:
+			case COLOR_TEAM1:
+			case COLOR_TEAM2:
+			case COLOR_TEAM3:
+			case COLOR_TEAM4:
+				break;
+			default:
+				if(GetTeam(Team, false) == NULL)
+				{
+					print("trying to switch to unsupported team ", ftos(Team), "\n");
+					Team = COLOR_SPECTATOR;
+				}
+				break;
+		}
 	}
+	else
+	{
+		switch(Team)
+		{
+			case -1:
+			case 0:
+				break;
+			default:
+				if(GetTeam(Team, false) == NULL)
+				{
+					print("trying to switch to unsupported team ", ftos(Team), "\n");
+					Team = COLOR_SPECTATOR;
+				}
+				break;
+		}
+	}
 	if(Team == -1) // leave
 	{
 		if(o.has_team)



More information about the nexuiz-commits mailing list