From 1ae01d89de0dc99b00f9a7d98d0533973d273fed Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 4 Jan 2024 03:35:16 +0300 Subject: [PATCH] engine: client: correctly support ENGINE_COMPUTE_STUDIO_LERP feature flag without STUDIO_INTERPOLATION_FIX enabled --- engine/client/cl_frame.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_frame.c b/engine/client/cl_frame.c index cf757a96..b6409036 100644 --- a/engine/client/cl_frame.c +++ b/engine/client/cl_frame.c @@ -1238,13 +1238,23 @@ void CL_LinkPacketEntities( frame_t *frame ) VectorCopy( ent->curstate.origin, ent->latched.prevorigin ); VectorCopy( ent->curstate.angles, ent->latched.prevangles ); - // disable step interpolation in client.dll - ent->curstate.movetype = MOVETYPE_NONE; + if( !FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP )) + { + // disable step interpolation in client.dll + ent->curstate.movetype = MOVETYPE_NONE; + } } else { - // restore step interpolation in client.dll - ent->curstate.movetype = MOVETYPE_STEP; + if( FBitSet( host.features, ENGINE_COMPUTE_STUDIO_LERP )) + { + interpolate = true; + } + else + { + // restore step interpolation in client.dll + ent->curstate.movetype = MOVETYPE_STEP; + } } #endif }