r4574 - in trunk/data/qcsrc: client common server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Oct 2 02:33:24 EDT 2008
Author: div0
Date: 2008-10-02 02:33:24 -0400 (Thu, 02 Oct 2008)
New Revision: 4574
Modified:
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/server/ent_cs.qc
Log:
optimize entcs data
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-10-01 19:32:41 UTC (rev 4573)
+++ trunk/data/qcsrc/client/Main.qc 2008-10-02 06:33:24 UTC (rev 4574)
@@ -332,9 +332,10 @@
InterpolateOrigin_Undo();
- self.origin_x = ReadCoord();
- self.origin_y = ReadCoord();
- self.angles_y = ReadCoord();
+ self.origin_x = ReadShort();
+ self.origin_y = ReadShort();
+ self.origin_z = ReadShort();
+ self.angles_y = ReadByte() * 360.0 / 256;
self.origin_z = self.angles_x = self.angles_z = 0;
InterpolateOrigin_Note();
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2008-10-01 19:32:41 UTC (rev 4573)
+++ trunk/data/qcsrc/common/constants.qh 2008-10-02 06:33:24 UTC (rev 4574)
@@ -19,7 +19,8 @@
// Revision 18: warmup
// Revision 19: fog
// Revision 20: naggers
-#define CSQC_REVISION 20
+// Revision 21: entcs for players optimized (position data down from 12 to 7 bytes)
+#define CSQC_REVISION 21
// probably put these in common/
// so server/ and client/ can be synced better
Modified: trunk/data/qcsrc/server/ent_cs.qc
===================================================================
--- trunk/data/qcsrc/server/ent_cs.qc 2008-10-01 19:32:41 UTC (rev 4573)
+++ trunk/data/qcsrc/server/ent_cs.qc 2008-10-02 06:33:24 UTC (rev 4574)
@@ -41,9 +41,10 @@
return;
}
WriteByte(MSG_ENTITY, ENTCS_MSG_ONS_GPS);
- WriteCoord(MSG_ENTITY, self.owner.origin_x);
- WriteCoord(MSG_ENTITY, self.owner.origin_y);
- WriteCoord(MSG_ENTITY, self.owner.angles_y);
+ WriteShort(MSG_ENTITY, self.owner.origin_x);
+ WriteShort(MSG_ENTITY, self.owner.origin_y);
+ WriteShort(MSG_ENTITY, self.owner.origin_z);
+ WriteByte(MSG_ENTITY, self.owner.angles_y * 256.0 / 360);
}
void entcs_common_self()
More information about the nexuiz-commits
mailing list