cat_nolerp 1 does something now
This commit is contained in:
parent
0139a6e86f
commit
f568229848
@ -19,6 +19,11 @@ void ThirdpersonCallback(IConVar* var, const char* pOldValue, float flOldValue)
|
||||
}
|
||||
}
|
||||
|
||||
ConVar* sv_client_min_interp_ratio;
|
||||
ConVar* cl_interp_ratio;
|
||||
ConVar* cl_interp;
|
||||
ConVar* cl_interpolate;
|
||||
|
||||
unsigned long tickcount = 0;
|
||||
char* force_name_newlined = new char[32] { 0 };
|
||||
bool need_name_change = true;
|
||||
@ -38,6 +43,11 @@ CatVar disconnect_reason(CV_STRING, "disconnect_reason", "", "Disconnect reason"
|
||||
|
||||
CatVar event_log(CV_SWITCH, "events", "1", "Advanced Events");
|
||||
void GlobalSettings::Init() {
|
||||
sv_client_min_interp_ratio = g_ICvar->FindVar("sv_client_min_interp_ratio");
|
||||
cl_interp_ratio = g_ICvar->FindVar("cl_interp_ratio");
|
||||
cl_interp = g_ICvar->FindVar("cl_interp");
|
||||
cl_interpolate = g_ICvar->FindVar("cl_interpolate");
|
||||
|
||||
bSendPackets = new bool;
|
||||
*bSendPackets = true;
|
||||
force_thirdperson.OnRegister([](CatVar* var) {
|
||||
|
@ -15,6 +15,11 @@ class CatVar;
|
||||
extern int g_AppID;
|
||||
extern unsigned long tickcount;
|
||||
|
||||
extern ConVar* sv_client_min_interp_ratio;
|
||||
extern ConVar* cl_interp_ratio;
|
||||
extern ConVar* cl_interp;
|
||||
extern ConVar* cl_interpolate;
|
||||
|
||||
extern CatVar event_log;
|
||||
extern CatVar cathook; // Master switch
|
||||
extern CatVar ignore_taunting;
|
||||
|
@ -163,15 +163,19 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
time_replaced = false;
|
||||
curtime_old = g_GlobalVars->curtime;
|
||||
|
||||
static ConVar* sv_client_min_interp_ratio = g_ICvar->FindVar("sv_client_min_interp_ratio");
|
||||
static ConVar* cl_interp = g_ICvar->FindVar("cl_interp");
|
||||
static ConVar* cl_interp_ratio = g_ICvar->FindVar("cl_interp_ratio");
|
||||
|
||||
if (nolerp) {
|
||||
g_pUserCmd->tick_count += 1;
|
||||
if (sv_client_min_interp_ratio->GetInt() != -1) sv_client_min_interp_ratio->SetValue(-1);
|
||||
if (cl_interp->GetInt() != 0) cl_interp->SetValue(0);
|
||||
if (sv_client_min_interp_ratio->GetInt() != -1) {
|
||||
//sv_client_min_interp_ratio->m_nFlags = 0;
|
||||
sv_client_min_interp_ratio->SetValue(-1);
|
||||
}
|
||||
if (cl_interp->m_fValue != 0) {
|
||||
cl_interp->SetValue(0);
|
||||
cl_interp->m_fValue = 0.0f;
|
||||
cl_interp->m_nValue = 0;
|
||||
}
|
||||
if (cl_interp_ratio->GetInt() != 0) cl_interp_ratio->SetValue(0);
|
||||
if (cl_interpolate->GetInt() != 0) cl_interpolate->SetValue(0);
|
||||
}
|
||||
|
||||
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
|
||||
|
Reference in New Issue
Block a user