r1825 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Aug 17 16:40:01 EDT 2006


Author: div0
Date: 2006-08-17 16:40:00 -0400 (Thu, 17 Aug 2006)
New Revision: 1825

Modified:
   trunk/data/default.cfg
   trunk/data/qcsrc/server/cl_player.qc
   trunk/data/qcsrc/server/t_teleporters.qc
Log:
added the option "teamplay only" to cl_shownames


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2006-08-17 17:46:25 UTC (rev 1824)
+++ trunk/data/default.cfg	2006-08-17 20:40:00 UTC (rev 1825)
@@ -740,4 +740,4 @@
 
 set sv_motd ""
 
-set cl_shownames 1 // show player names pointed to
+set cl_shownames 1 // show player names pointed to (0: never, 1: teamplay only, 2: always)

Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc	2006-08-17 17:46:25 UTC (rev 1824)
+++ trunk/data/qcsrc/server/cl_player.qc	2006-08-17 20:40:00 UTC (rev 1825)
@@ -377,9 +377,12 @@
 	if(clienttype(self) != CLIENTTYPE_REAL)
 		return;
 
-	if(!self.cvar_cl_shownames)
+	if(self.cvar_cl_shownames == 0)
 		return;
 
+	if(self.cvar_cl_shownames == 1 && !teams_matter)
+		return;
+
 	// 1. cursor trace is always right
 	if(self.cursor_trace_ent && self.cursor_trace_ent.classname == "player" && !self.cursor_trace_ent.deadflag)
 	{

Modified: trunk/data/qcsrc/server/t_teleporters.qc
===================================================================
--- trunk/data/qcsrc/server/t_teleporters.qc	2006-08-17 17:46:25 UTC (rev 1824)
+++ trunk/data/qcsrc/server/t_teleporters.qc	2006-08-17 20:40:00 UTC (rev 1825)
@@ -88,6 +88,15 @@
 	other.oldvelocity = other.velocity;
 	// reset tracking of who pushed you into a hazard (for kill credit)
 	other.pushltime = 0;
+
+	// stop player name display
+	{
+		entity oldself;
+		oldself = self;
+		self = other;
+		ClearSelectedPlayer();
+		self = oldself;
+	}
 }
 
 void info_teleport_destination (void)




More information about the nexuiz-commits mailing list