X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_parse.c;h=3d56d11199524f718b880249a9707b05a3952524;hb=da09a08bda26fbe438e4b53f1121bb2b2392692d;hp=08c726faa80bfd469dea4600b86a5845cc50308f;hpb=503f6fef27f5b87b9d71aa290f5a0890b159ff15;p=xonotic%2Fdarkplaces.git diff --git a/cl_parse.c b/cl_parse.c index 08c726fa..3d56d111 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "libcurl.h" #include "utf8lib.h" #include "menu.h" +#include "cl_video.h" const char *svc_strings[128] = { @@ -246,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 { @@ -261,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) @@ -1619,7 +1622,11 @@ void CL_ParseServerInfo (void) protocolversion_t protocol; int nummodels, numsounds; + // if we start loading a level and a video is still playing, stop it + CL_VideoStop(); + Con_DPrint("Serverinfo packet received.\n"); + Collision_Cache_Reset(true); // if server is active, we already began a loading plaque if (!sv.active) @@ -3197,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) { @@ -3280,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);