]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
cleaned up client qc, menu qc, and server qc VM initialization a bit so they have...
[xonotic/darkplaces.git] / cl_main.c
index 6ed498570bbd8d089a74f0bec3e076acb2f90f9a..05a36f55b1d87f14b58acafda9daba5ce61a0d2b 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -500,14 +500,11 @@ static float CL_LerpPoint(void)
 {
        float f;
 
-       // dropped packet, or start of demo
-       if (cl.mtime[1] < cl.mtime[0] - 0.1)
-               cl.mtime[1] = cl.mtime[0] - 0.1;
-
-       cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
+       if (cl_nettimesyncmode.integer == 3)
+               cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
 
        // LordHavoc: lerp in listen games as the server is being capped below the client (usually)
-       if (cl.mtime[0] <= cl.mtime[1] || cl_nolerp.integer || cls.timedemo || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer))
+       if (cl.mtime[0] <= cl.mtime[1])
        {
                cl.time = cl.mtime[0];
                return 1;
@@ -769,7 +766,6 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit)
 {
        const matrix4x4_t *matrix;
        matrix4x4_t blendmatrix, tempmatrix, matrix2;
-       //matrix4x4_t dlightmatrix;
        int j, k, l;
        float origin[3], angles[3], delta[3], lerp, d;
        entity_t *t;
@@ -995,7 +991,6 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit)
 // creates light and trails from an entity
 void CL_UpdateNetworkEntityTrail(entity_t *e)
 {
-       //matrix4x4_t dlightmatrix;
        effectnameindex_t trailtype;
        vec3_t origin;
 
@@ -1007,6 +1002,8 @@ void CL_UpdateNetworkEntityTrail(entity_t *e)
                VectorMAM(0.5f, e->render.model->normalmins, 0.5f, e->render.model->normalmaxs, o);
                Matrix4x4_Transform(&e->render.matrix, o, origin);
        }
+       else
+               Matrix4x4_OriginFromMatrix(&e->render.matrix, origin);
 
        // handle particle trails and such effects now that we know where this
        // entity is in the world...
@@ -1732,6 +1729,11 @@ static void CL_TimeRefresh_f (void)
        Con_Printf("%f seconds (%f fps)\n", timedelta, 128/timedelta);
 }
 
+void CL_AreaStats_f(void)
+{
+       World_PrintAreaStats(&cl.world, "client");
+}
+
 /*
 ===========
 CL_Shutdown
@@ -1806,6 +1808,8 @@ void CL_Init (void)
        // LordHavoc: added pausedemo
        Cmd_AddCommand ("pausedemo", CL_PauseDemo_f, "pause demo playback (can also safely pause demo recording if using QUAKE, QUAKEDP or NEHAHRAMOVIE protocol, useful for making movies)");
 
+       Cmd_AddCommand ("cl_areastats", CL_AreaStats_f, "prints statistics on entity culling during collision traces");
+
        Cvar_RegisterVariable(&r_draweffects);
        Cvar_RegisterVariable(&cl_explosions_alpha_start);
        Cvar_RegisterVariable(&cl_explosions_alpha_end);