Browse Source

engine: client: added cvar cl_nointerp for disabling interpolation

pull/2/head
SNMetamorph 4 years ago committed by Alibek Omarov #SupportRMS
parent
commit
b289de26a6
  1. 10
      engine/client/cl_frame.c
  2. 4
      engine/client/cl_main.c
  3. 1
      engine/client/client.h

10
engine/client/cl_frame.c

@ -131,6 +131,9 @@ some ents will be ignore lerping @@ -131,6 +131,9 @@ some ents will be ignore lerping
*/
qboolean CL_EntityIgnoreLerp( cl_entity_t *e )
{
if( cl_nointerp->value > 0.f )
return true;
if( e->model && e->model->type == mod_alias )
return false;
@ -529,6 +532,13 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent ) @@ -529,6 +532,13 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent )
if( !ent->player || ent->index == ( cl.playernum + 1 ))
return;
if( cl_nointerp->value > 0.f )
{
VectorCopy( ent->curstate.angles, ent->angles );
VectorCopy( ent->curstate.origin, ent->origin );
return;
}
if( cls.demoplayback == DEMO_QUAKE1 )
{
// quake lerping is easy

4
engine/client/cl_main.c

@ -63,6 +63,7 @@ convar_t *cl_updaterate; @@ -63,6 +63,7 @@ convar_t *cl_updaterate;
convar_t *cl_showevents;
convar_t *cl_cmdrate;
convar_t *cl_interp;
convar_t *cl_nointerp;
convar_t *cl_dlmax;
convar_t *cl_upmax;
@ -2844,7 +2845,8 @@ void CL_InitLocal( void ) @@ -2844,7 +2845,8 @@ void CL_InitLocal( void )
Cvar_Get( "team", "", FCVAR_USERINFO, "player team" );
Cvar_Get( "skin", "", FCVAR_USERINFO, "player skin" );
cl_nosmooth = Cvar_Get( "cl_nosmooth", "0", FCVAR_ARCHIVE, "disable smooth up stair climbing and interpolate position in multiplayer" );
cl_nosmooth = Cvar_Get( "cl_nosmooth", "0", FCVAR_ARCHIVE, "disable smooth up stair climbing" );
cl_nointerp = Cvar_Get( "cl_nointerp", "0", FCVAR_CLIENTDLL, "disable interpolation of entities and players" );
cl_smoothtime = Cvar_Get( "cl_smoothtime", "0", FCVAR_ARCHIVE, "time to smooth up" );
cl_cmdbackup = Cvar_Get( "cl_cmdbackup", "10", FCVAR_ARCHIVE, "how many additional history commands are sent" );
cl_cmdrate = Cvar_Get( "cl_cmdrate", "30", FCVAR_ARCHIVE, "Max number of command packets sent to server per second" );

1
engine/client/client.h

@ -658,6 +658,7 @@ extern convar_t *cl_nopred; @@ -658,6 +658,7 @@ extern convar_t *cl_nopred;
extern convar_t *cl_timeout;
extern convar_t *cl_nodelta;
extern convar_t *cl_interp;
extern convar_t *cl_nointerp;
extern convar_t *cl_showerror;
extern convar_t *cl_nosmooth;
extern convar_t *cl_smoothtime;

Loading…
Cancel
Save