engine: add new engine feature ENGINE_STEP_POSHISTORY_LERP that enables CStrike's MOVETYPE_STEP lerp based on position history

This commit is contained in:
Alibek Omarov
2024-01-04 05:05:03 +03:00
parent 1ae01d89de
commit 49f972a7c9
2 changed files with 9 additions and 3 deletions

View File

@@ -189,7 +189,7 @@ CL_ParametricMove
check for parametrical moved entities
==================
*/
qboolean CL_ParametricMove( cl_entity_t *ent )
static qboolean CL_ParametricMove( cl_entity_t *ent )
{
float frac, dt, t;
vec3_t delta;
@@ -1279,7 +1279,10 @@ void CL_LinkPacketEntities( frame_t *frame )
if ( !CL_InterpolateModel( ent ))
continue;
}
else if( ent->curstate.movetype == MOVETYPE_STEP && !NET_IsLocalAddress( cls.netchan.remote_address ))
// a1ba: in GoldSrc this is done for cstrike and czero
// but let modders use this as an engine feature
else if( FBitSet( host.features, ENGINE_STEP_POSHISTORY_LERP ) &&
ent->curstate.movetype == MOVETYPE_STEP && !NET_IsLocalAddress( cls.netchan.remote_address ))
{
if( !CL_InterpolateModel( ent ))
continue;