Added convar to disable hermite interp
This commit is contained in:
parent
9fdd0ebe71
commit
f0954d23f3
3 changed files with 17 additions and 2 deletions
|
@ -6,6 +6,8 @@
|
||||||
//===========================================================================//
|
//===========================================================================//
|
||||||
#include "cbase.h"
|
#include "cbase.h"
|
||||||
#include "c_baseentity.h"
|
#include "c_baseentity.h"
|
||||||
|
#include "convar.h"
|
||||||
|
#include "iconvar.h"
|
||||||
#include "interpolatedvar.h"
|
#include "interpolatedvar.h"
|
||||||
#include "prediction.h"
|
#include "prediction.h"
|
||||||
#include "model_types.h"
|
#include "model_types.h"
|
||||||
|
@ -6340,6 +6342,11 @@ bool C_BaseEntity::ValidateEntityAttachedToPlayer( bool &bShouldRetry )
|
||||||
}
|
}
|
||||||
#endif // TF_CLIENT_DLL
|
#endif // TF_CLIENT_DLL
|
||||||
|
|
||||||
|
ConVar cl_interp_no_hermite( "cl_interp_no_hermite",
|
||||||
|
"1",
|
||||||
|
FCVAR_NOT_CONNECTED,
|
||||||
|
"This fixes lag compensation and game screen not respecting camera's at the expense of "
|
||||||
|
"maybe more unsmooth game play. (maybe)" );
|
||||||
|
|
||||||
void C_BaseEntity::AddVar( void *data, IInterpolatedVar *watcher, int type, bool bSetup )
|
void C_BaseEntity::AddVar( void *data, IInterpolatedVar *watcher, int type, bool bSetup )
|
||||||
{
|
{
|
||||||
|
@ -6350,7 +6357,16 @@ void C_BaseEntity::AddVar( void *data, IInterpolatedVar *watcher, int type, bool
|
||||||
// This is needed to get the perfect lag compensation for origin.
|
// This is needed to get the perfect lag compensation for origin.
|
||||||
// It's possible to have hermite interpolation in lag compensation,
|
// It's possible to have hermite interpolation in lag compensation,
|
||||||
// but it would require some extra flags being sent to the server.
|
// but it would require some extra flags being sent to the server.
|
||||||
type |= INTERPOLATE_LINEAR_ONLY;
|
|
||||||
|
if ( cl_interp_no_hermite.GetBool() )
|
||||||
|
{
|
||||||
|
type |= INTERPOLATE_LINEAR_ONLY;
|
||||||
|
DevMsg( "Linear only interpolation enabled for entity %i (varname: %s) !\n", index, watcher->GetDebugName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DevMsg( "Hermite interpolation enabled for entity: %i (varname: %s) !\n", index, watcher->GetDebugName());
|
||||||
|
}
|
||||||
|
|
||||||
for ( int i=0; i < m_VarMap.m_Entries.Count(); i++ )
|
for ( int i=0; i < m_VarMap.m_Entries.Count(); i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "tier1/utllinkedlist.h"
|
#include "tier1/utllinkedlist.h"
|
||||||
#include "rangecheckedvar.h"
|
#include "rangecheckedvar.h"
|
||||||
#include "lerp_functions.h"
|
#include "lerp_functions.h"
|
||||||
#include "animationlayer.h"
|
|
||||||
#include "convar.h"
|
#include "convar.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue