Revert NavBot and fix issues with AntiAim and aimbot

This commit is contained in:
LightCat 2018-11-02 13:15:35 +01:00
parent 858f4ac7bf
commit 38a049d148
5 changed files with 574 additions and 522 deletions

View File

@ -64,13 +64,11 @@
<List width="170">
<AutoVariable width="fill" target="misc.pathing" label="Enable Pathing"/>
<AutoVariable width="fill" target="misc.pathing.draw" label="Draw Path"/>
<AutoVariable width="fill" target="navbot.enable" label="Master Switch"/>
<AutoVariable width="fill" target="navbot.sniper-mode" label="Enable Sniper Mode"/>
<AutoVariable width="fill" target="navbot.enable" label="Enable Navbot"/>
<AutoVariable width="fill" target="navbot.scout-mode" label="Enable Scout Mode"/>
<AutoVariable width="fill" target="navbot.spy-mode" label="Enable Spy Mode"/>
<AutoVariable width="fill" target="navbot.heavy-mode" label="Enable Heavy Mode"/>
<AutoVariable width="fill" target="navbot.engi-mode" label="Enable Engie Mode"/>
<AutoVariable width="fill" target="navbot.best-slot" label="Best Weapon only"/>
<AutoVariable width="fill" target="navbot.primary-only" label="Best Weapon only"/>
<AutoVariable width="fill" target="navbot.jump-distance" label="Jump Distance"/>
<AutoVariable width="fill" target="navbot.target-sentry" label="Try to target sentries"/>
<AutoVariable width="fill" target="navbot.stay-near" label="Zone enemies (stay near)"/>

View File

@ -1,27 +1,12 @@
//
// Created by bencat07 on 17.08.18.
//
#pragma once
#include "common.hpp"
namespace hacks::shared::NavBot
#include "config.h"
namespace hacks::tf2::NavBot
{
// Main Functions
void Init(bool from_LevelInit);
// Helper
bool CanPath();
bool HasLowHealth();
bool HasLowAmmo();
CachedEntity *nearestHealth();
CachedEntity *nearestAmmo();
std::pair<CachedEntity *, int> nearestEnemy();
CachedEntity *nearestTeleporter();
Vector GetClosestValidByDist(CachedEntity *ent, int idx, float mindist, float maxdist, bool near);
CNavArea *GetNavArea(Vector loc);
void UpdateSlot();
void Jump();
// Path
bool NavToSniperSpot(int priority);
bool NavToNearestEnemy();
bool NavToBacktrackTick(int priority);
} // namespace hacks::shared::NavBot
void Init();
void initonce();
} // namespace hacks::tf2::NavBot

View File

@ -813,7 +813,7 @@ void DoAutoshoot()
begancharge)
{
current_user_cmd->buttons &= ~IN_ATTACK;
hacks::shared::antiaim::SetSafeSpace(3);
hacks::shared::antiaim::SetSafeSpace(5);
begancharge = false;
// Pull string if charge isnt enough
}
@ -836,7 +836,7 @@ void DoAutoshoot()
if ((chargetime >= 3.85f * *sticky_autoshoot) && begansticky > 3)
{
current_user_cmd->buttons &= ~IN_ATTACK;
hacks::shared::antiaim::SetSafeSpace(3);
hacks::shared::antiaim::SetSafeSpace(5);
begansticky = 0;
}
// Else just keep charging

File diff suppressed because it is too large Load Diff

View File

@ -286,7 +286,7 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
// hacks::tf2::NavBot::initonce();
nav::status = nav::off;
IRC::auth();
hacks::shared::NavBot::Init(true);
hacks::tf2::NavBot::initonce();
firstcm = false;
}
g_Settings.bInvalid = false;