X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=3d56d11199524f718b880249a9707b05a3952524;hb=cf0da2edf701e03cd2b7447523a850515005d1eb;hp=1f229fd6a51177b0af6a6083c4cba0f5373cb3b5;hpb=ceef40ca3c9282f8fc7d44e54998923257889bfb;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 1f229fd6..3d56d111 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -247,7 +247,7 @@ void CL_ParseStartSoundPacket(int largesoundindex) if (field_mask & SND_LARGEENTITY) { ent = (unsigned short) MSG_ReadShort (); - channel = MSG_ReadByte (); + channel = MSG_ReadChar (); } else { @@ -262,6 +262,8 @@ void CL_ParseStartSoundPacket(int largesoundindex) sound_num = MSG_ReadByte (); } + channel = CHAN_NET2ENGINE(channel); + MSG_ReadVector(pos, cls.protocol); if (sound_num >= MAX_SOUNDS) @@ -3202,6 +3204,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 +3288,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);