From 6d2aecb1bb2e09cdd6ff0c3d44600d1af67b2305 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 22 Nov 2023 06:47:11 +1000 Subject: [PATCH] cl_nolerp: use normal time synchronisation Fixes constant packet discards on LAN and impossible pings online, when FPS > ticrate. Signed-off-by: bones_was_here --- cl_main.c | 1 + cl_parse.c | 2 +- client.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_main.c b/cl_main.c index 6e385c81..64e711c7 100644 --- a/cl_main.c +++ b/cl_main.c @@ -1175,6 +1175,7 @@ static void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qbool interp // someone or watching a cutscene of some sort if (cl_nolerp.integer || cls.timedemo) interpolate = false; + if (e == cl.entities + cl.playerentity && cl.movement_predicted && (!cl.fixangle[1] || !cl.fixangle[0])) { VectorCopy(cl.movement_origin, origin); diff --git a/cl_parse.c b/cl_parse.c index 91f0f274..d0f39723 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -3284,7 +3284,7 @@ static void CL_NetworkTimeReceived(double newtime) cl.opt_inputs_since_update = 0; cl.mtime[1] = cl.mtime[0]; cl.mtime[0] = newtime; - if (cl_nolerp.integer || cls.timedemo || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS) + if (cls.timedemo || cl.mtime[1] == cl.mtime[0] || cls.signon < SIGNONS) cl.time = cl.mtime[1] = newtime; else if (cls.demoplayback) { diff --git a/client.h b/client.h index 60d921e6..a7b275ca 100644 --- a/client.h +++ b/client.h @@ -1167,7 +1167,6 @@ extern cvar_t cl_anglespeedkey; extern cvar_t cl_autofire; extern cvar_t cl_shownet; -extern cvar_t cl_nolerp; extern cvar_t cl_nettimesyncfactor; extern cvar_t cl_nettimesyncboundmode; extern cvar_t cl_nettimesyncboundtolerance; -- 2.39.2