X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=ca4bec30cd8fdf8b30f2fcb145be4395ca292ca8;hb=f8b93f14e3cc4324eb93f4b47745d6ce5d89400d;hp=1f229fd6a51177b0af6a6083c4cba0f5373cb3b5;hpb=ceef40ca3c9282f8fc7d44e54998923257889bfb;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 1f229fd6..ca4bec30 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -3202,6 +3202,7 @@ qboolean CL_ExaminePrintString(const char *text) } extern cvar_t slowmo; +extern cvar_t cl_lerpexcess; extern void CSQC_UpdateNetworkTimes(double newtime, double oldtime); static void CL_NetworkTimeReceived(double newtime) { @@ -3285,6 +3286,20 @@ static void CL_NetworkTimeReceived(double newtime) if (cl.mtime[0] > cl.mtime[1]) World_Physics_Frame(&cl.world, cl.mtime[0] - cl.mtime[1], cl.movevars_gravity); + + // only lerp entities that also get an update in this frame, when lerp excess is used + if(cl_lerpexcess.value > 0) + { + int i; + for (i = 1;i < cl.num_entities;i++) + { + if (cl.entities_active[i]) + { + entity_t *ent = cl.entities + i; + ent->persistent.lerpdeltatime = 0; + } + } + } } #define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf("%3i:%s(%i)\n", msg_readcount-1, x, cmd);