r5430 - in trunk/data/qcsrc: client server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jan 6 17:23:06 EST 2009


Author: div0
Date: 2009-01-06 17:23:06 -0500 (Tue, 06 Jan 2009)
New Revision: 5430

Modified:
   trunk/data/qcsrc/client/waypointsprites.qc
   trunk/data/qcsrc/server/waypointsprites.qc
Log:
csqc: send origin only when needed in WP sprites (shouldn't change much)


Modified: trunk/data/qcsrc/client/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/client/waypointsprites.qc	2009-01-06 21:08:42 UTC (rev 5429)
+++ trunk/data/qcsrc/client/waypointsprites.qc	2009-01-06 22:23:06 UTC (rev 5430)
@@ -209,10 +209,13 @@
 
 	InterpolateOrigin_Undo();
 
-	// unfortunately, this needs to be exact (for the 3D display)
-	self.origin_x = ReadCoord();
-	self.origin_y = ReadCoord();
-	self.origin_z = ReadCoord();
+	if(sendflags & 64)
+	{
+		// unfortunately, this needs to be exact (for the 3D display)
+		self.origin_x = ReadCoord();
+		self.origin_y = ReadCoord();
+		self.origin_z = ReadCoord();
+	}
 
 	if(sendflags & 1)
 	{

Modified: trunk/data/qcsrc/server/waypointsprites.qc
===================================================================
--- trunk/data/qcsrc/server/waypointsprites.qc	2009-01-06 21:08:42 UTC (rev 5429)
+++ trunk/data/qcsrc/server/waypointsprites.qc	2009-01-06 22:23:06 UTC (rev 5430)
@@ -30,7 +30,7 @@
 	if(o != e.origin)
 	{
 		setorigin(e, o);
-		e.SendFlags |= 128;
+		e.SendFlags |= 64;
 	}
 }
 
@@ -165,10 +165,14 @@
 {
 	WriteByte(MSG_ENTITY, ENT_CLIENT_WAYPOINT);
 	WriteByte(MSG_ENTITY, sendflags);
-	WriteCoord(MSG_ENTITY, self.origin_x);
-	WriteCoord(MSG_ENTITY, self.origin_y);
-	WriteCoord(MSG_ENTITY, self.origin_z);
 
+	if(sendflags & 64)
+	{
+		WriteCoord(MSG_ENTITY, self.origin_x);
+		WriteCoord(MSG_ENTITY, self.origin_y);
+		WriteCoord(MSG_ENTITY, self.origin_z);
+	}
+
 	if(sendflags & 1)
 	{
 		WriteByte(MSG_ENTITY, self.team);




More information about the nexuiz-commits mailing list