AutoReflect key + experimental cat_nolerp
This commit is contained in:
parent
9d13e787b6
commit
133830a1c6
@ -17,7 +17,7 @@ CatVar enabled(CV_SWITCH, "reflect_enabled", "0", "Auto Reflect", "Master AutoRe
|
||||
CatVar idle_only(CV_SWITCH, "reflect_only_idle", "0", "Only when not shooting", "Don't AutoReflect if you're holding M1");
|
||||
CatVar legit(CV_SWITCH, "reflect_legit", "0", "Legit Reflect", "Only Auto-airblasts projectiles that you can see, doesnt move your crosshair");
|
||||
CatVar dodgeball(CV_SWITCH, "reflect_dodgeball", "0", "Dodgeball Mode", "Allows auto-reflect to work in dodgeball servers");
|
||||
|
||||
CatVar blastkey(CV_KEY, "reflect_key", "0", "Reflect Key", "Hold this key to activate auto-airblast");
|
||||
CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Reflect Stickybombs");
|
||||
// TODO setup proj sorting
|
||||
// TODO CatVar big_proj(CV_SWITCH, "reflect_big_projectile", "0", "Reflect big projectiles", "Reflect Rockets");
|
||||
@ -29,6 +29,7 @@ CatVar stickies(CV_SWITCH, "reflect_stickybombs", "0", "Reflect stickies", "Refl
|
||||
void CreateMove() {
|
||||
// Check if user settings allow Auto Reflect
|
||||
if (!enabled) return;
|
||||
if (blastkey && !blastkey.KeyDown()) return;
|
||||
|
||||
// Check if player is using a flame thrower
|
||||
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
|
||||
|
@ -13,25 +13,6 @@
|
||||
#include "hookedmethods.h"
|
||||
#include <link.h>
|
||||
|
||||
// FIXME remove this temporary code already!
|
||||
float AngleDiff( float destAngle, float srcAngle )
|
||||
{
|
||||
float delta;
|
||||
|
||||
delta = fmodf(destAngle - srcAngle, 360.0f);
|
||||
if ( destAngle > srcAngle )
|
||||
{
|
||||
if ( delta >= 180 )
|
||||
delta -= 360;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( delta <= -180 )
|
||||
delta += 360;
|
||||
}
|
||||
return delta;
|
||||
}
|
||||
|
||||
#include "../profiler.h"
|
||||
|
||||
static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump", "Allows jumping while shooting with minigun");
|
||||
@ -39,6 +20,8 @@ static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
||||
CatVar jointeam(CV_SWITCH, "fb_autoteam", "1", "Joins player team automatically (NYI)");
|
||||
CatVar joinclass(CV_STRING, "fb_autoclass", "spy", "Class that will be picked after joining a team (NYI)");
|
||||
|
||||
CatVar nolerp(CV_SWITCH, "nolerp", "0", "NoLerp mode (experimental)");
|
||||
|
||||
class CMoveData;
|
||||
namespace engine_prediction {
|
||||
|
||||
@ -180,6 +163,17 @@ 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 (cl_interp_ratio->GetInt() != 0) cl_interp_ratio->SetValue(0);
|
||||
}
|
||||
|
||||
if (!g_Settings.bInvalid && CE_GOOD(g_pLocalPlayer->entity)) {
|
||||
servertime = (float)CE_INT(g_pLocalPlayer->entity, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
|
||||
g_GlobalVars->curtime = servertime;
|
||||
@ -188,6 +182,9 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
if (g_Settings.bInvalid) {
|
||||
entity_cache::Invalidate();
|
||||
}
|
||||
|
||||
// Disabled because this causes EXTREME aimbot inaccuracy
|
||||
//if (!cmd->command_number) return ret;
|
||||
// PROF_BEGIN();
|
||||
{
|
||||
PROF_SECTION(EntityCache);
|
||||
@ -203,8 +200,6 @@ bool CreateMove_hook(void* thisptr, float inputSample, CUserCmd* cmd) {
|
||||
SAFE_CALL(g_pLocalPlayer->Update());
|
||||
}
|
||||
g_Settings.bInvalid = false;
|
||||
// Disabled because this causes EXTREME aimbot inaccuracy
|
||||
//if (!cmd->command_number) return ret;
|
||||
#ifdef IPC_ENABLED
|
||||
static int team_joining_state = 0;
|
||||
static float last_jointeam_try = 0;
|
||||
|
@ -113,7 +113,8 @@
|
||||
"reflect_legit",
|
||||
"reflect_only_idle",
|
||||
"reflect_stickybombs",
|
||||
"reflect_dodgeball"
|
||||
"reflect_dodgeball",
|
||||
"reflect_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user