r4646 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Oct 6 09:21:54 EDT 2008


Author: div0
Date: 2008-10-06 09:21:54 -0400 (Mon, 06 Oct 2008)
New Revision: 4646

Modified:
   trunk/data/qcsrc/server/waypointsprites.qc
Log:
experimental change: only resend a waypointsprite if its origin (or its carrier's) actually changed. Please test this in CTF when your flag carrier does not move and you change team. Should work because of the latest CSQC code change.


Modified: trunk/data/qcsrc/server/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/server/waypointsprites.qc	2008-10-06 13:18:46 UTC (rev 4645)
+++ trunk/data/qcsrc/server/waypointsprites.qc	2008-10-06 13:21:54 UTC (rev 4646)
@@ -26,12 +26,16 @@
 
 void WaypointSprite_UpdateOrigin(entity e, vector o)
 {
-	e.origin = o;
-	e.SendFlags |= 128;
+	if(o != e.origin)
+	{
+		e.origin = o;
+		e.SendFlags |= 128;
+	}
 }
 
 void WaypointSprite_UpdateRule(entity e, float t, float r)
 {
+	// no check, as this is never called without doing an actual change (usually only once)
 	e.rule = r;
 	e.team = t;
 	e.SendFlags |= 1;
@@ -39,13 +43,15 @@
 
 void WaypointSprite_UpdateTeamRadar(entity e, float icon, vector col)
 {
-	e.cnt = (icon & 0x7F);
+	// no check, as this is never called without doing an actual change (usually only once)
+	e.cnt = (icon & 0x7F) | (e.cnt & 0x80);
 	e.colormod = col;
 	e.SendFlags |= 32;
 }
 
 void WaypointSprite_Ping(entity e)
 {
+	// ALWAYS sends (this causes a radar circle), thus no check
 	e.cnt |= 0x80;
 	e.SendFlags |= 32;
 }




More information about the nexuiz-commits mailing list