r5575 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jan 16 13:43:54 EST 2009
Author: div0
Date: 2009-01-16 13:43:50 -0500 (Fri, 16 Jan 2009)
New Revision: 5575
Modified:
trunk/data/qcsrc/client/Defs.qc
trunk/data/qcsrc/client/Main.qc
Log:
use servertime that LH just added :)
Modified: trunk/data/qcsrc/client/Defs.qc
===================================================================
--- trunk/data/qcsrc/client/Defs.qc 2009-01-16 17:08:56 UTC (rev 5574)
+++ trunk/data/qcsrc/client/Defs.qc 2009-01-16 18:43:50 UTC (rev 5575)
@@ -215,4 +215,6 @@
float blurtest_time0, blurtest_time1, blurtest_radius, blurtest_power;
#endif
+float servertime, serverprevtime, serverdeltatime;
+
float ticrate;
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2009-01-16 17:08:56 UTC (rev 5574)
+++ trunk/data/qcsrc/client/Main.qc 2009-01-16 18:43:50 UTC (rev 5575)
@@ -478,7 +478,14 @@
void(float bIsNewEntity) CSQC_Ent_Update =
{
float t;
+ float savetime;
t = ReadByte();
+
+ // set up the "time" global for received entities to be correct for interpolation purposes
+ savetime = time;
+ if(servertime)
+ time = servertime;
+
#ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED
if(self.enttype)
if(t != self.enttype)
@@ -511,6 +518,7 @@
else
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
+ time = savetime;
};
// Destructor, but does NOT deallocate the entity by calling remove(). Also
// used when an entity changes its type. For an entity that someone interacts
More information about the nexuiz-commits
mailing list