Merge pull request #296 from oneechanhax/master

Slight aimbot rework + Misc changes
This commit is contained in:
oneechanhax 2017-08-27 03:02:04 -05:00 committed by GitHub
commit 29123bb4c9
8 changed files with 264 additions and 454 deletions

View File

@ -64,7 +64,7 @@ If you don't use Ubuntu or Arch (or if Arch script gets outdated), here's the li
Cathook installation script: Cathook installation script:
```bash ```bash
git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && bash build-tf2 && bash check-data /opt/cathook/data git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && bash build-tf2
``` ```
**Errors while installing?** **Errors while installing?**

View File

@ -52,22 +52,16 @@
"aimbot_hitbox", "aimbot_hitbox",
"aimbot_zoomed", "aimbot_zoomed",
"aimbot_only_when_can_shoot", "aimbot_only_when_can_shoot",
"aimbot_enable_attack_only",
"aimbot_maxrange", "aimbot_maxrange",
"aimbot_slow", "aimbot_slow",
"aimbot_slow_smooth",
"aimbot_slow_autoshoot",
{ {
"type": "list", "type": "list",
"name": "Projectile Aimbot Tweaks", "name": "Projectile Aimbot Tweaks",
"list": [ "list": [
"aimbot_projectile", "aimbot_projectile",
"aimbot_proj_fovpred",
"aimbot_proj_vispred",
"aimbot_proj_gravity", "aimbot_proj_gravity",
"aimbot_proj_speed", "aimbot_proj_speed",
"aimbot_huntsman_charge", "aimbot_huntsman_charge"
"aimbot_full_auto_huntsman"
] ]
} }
] ]
@ -439,31 +433,30 @@
"type": "list", "type": "list",
"name": "Miscellaneous", "name": "Miscellaneous",
"list": [ "list": [
"name",
"disconnect_reason",
"name_stealer",
"bhop_enabled",
"nopush_enabled",
"noisemaker",
"tauntslide_tf2",
"anti_afk",
"events",
"airstuck",
"fast_vischeck",
"instant_weapon_switch",
"fakelag",
"skinchanger",
"autoqueue",
"autotaunt", "autotaunt",
"autotaunt_chance", "autotaunt_chance",
"autojoin_team", "autojoin_team",
"autojoin_class", "autojoin_class",
"autoqueue",
"events",
"airstuck",
"instant_weapon_switch",
"name",
"fakelag",
"disconnect_reason",
"name_stealer",
"minigun_jump", "minigun_jump",
"spycrab",
"skinchanger",
"bhop_enabled",
"noisemaker",
"nopush_enabled",
"fast_vischeck",
"anti_afk",
"rollspeedhack",
"info",
"tauntslide_tf2",
"tauntslide", "tauntslide",
"flashlight", "flashlight",
"rollspeedhack",
"info",
"request_balance_spam", "request_balance_spam",
{ {
"type": "list", "type": "list",
@ -476,6 +469,7 @@
"removecond_taunt", "removecond_taunt",
"removecond_bleeding", "removecond_bleeding",
"removecond_stun", "removecond_stun",
"spycrab",
"instant_decloak", "instant_decloak",
"instant_rezoom", "instant_rezoom",
"infinite_packs", "infinite_packs",

View File

@ -80,7 +80,7 @@ bool EntityHitboxCache::VisibilityCheck(int id) {
} }
static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" }); static CatEnum setupbones_time_enum({ "ZERO", "CURTIME", "LP SERVERTIME", "SIMTIME" });
static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "1", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!"); static CatVar setupbones_time(setupbones_time_enum, "setupbones_time", "3", "Setupbones", "Defines setupbones 4th argument, change it if your aimbot misses, idk!!");
matrix3x4_t* EntityHitboxCache::GetBones() { matrix3x4_t* EntityHitboxCache::GetBones() {
static float bones_setup_time = 0.0f; static float bones_setup_time = 0.0f;

File diff suppressed because it is too large Load Diff

View File

@ -50,12 +50,11 @@ bool ShouldAim();
CachedEntity* RetrieveBestTarget(bool aimkey_state); CachedEntity* RetrieveBestTarget(bool aimkey_state);
bool IsTargetStateGood(CachedEntity* entity); bool IsTargetStateGood(CachedEntity* entity);
void Aim(CachedEntity* entity); void Aim(CachedEntity* entity);
bool CanAutoShoot(); void DoAutoshoot();
int BestHitbox(CachedEntity* target); int BestHitbox(CachedEntity* target);
int ClosestHitbox(CachedEntity* target); int ClosestHitbox(CachedEntity* target);
void slowAim(Vector &inputAngle, Vector userAngle); void DoSlowAim(Vector &inputAngle);
bool UpdateAimkey(); bool UpdateAimkey();
bool GetCanAim(int mode);
float EffectiveTargetingRange(); float EffectiveTargetingRange();
}}} }}}

View File

@ -305,28 +305,24 @@ void CreateMove() {
if (tauntslide_tf2) { if (tauntslide_tf2) {
// Check to prevent crashing // Check to prevent crashing
if (CE_GOOD(LOCAL_E)) { if (CE_GOOD(LOCAL_E)) {
// If the local player is taunting
if (HasCondition<TFCond_Taunting>(LOCAL_E)) { if (HasCondition<TFCond_Taunting>(LOCAL_E)) {
// get directions
float forward = 0; float forward = 0;
float side = 0; float side = 0;
// get directions
if (g_pUserCmd->buttons & IN_FORWARD) forward += 450; if (g_pUserCmd->buttons & IN_FORWARD) forward += 450;
if (g_pUserCmd->buttons & IN_BACK) forward -= 450; if (g_pUserCmd->buttons & IN_BACK) forward -= 450;
if (g_pUserCmd->buttons & IN_MOVELEFT) side -= 450; if (g_pUserCmd->buttons & IN_MOVELEFT) side -= 450;
if (g_pUserCmd->buttons & IN_MOVERIGHT) side += 450; if (g_pUserCmd->buttons & IN_MOVERIGHT) side += 450;
// Push them to userCmd
g_pUserCmd->forwardmove = forward; g_pUserCmd->forwardmove = forward;
g_pUserCmd->sidemove = side; g_pUserCmd->sidemove = side;
// Grab Camera angle static QAngle camera_angle;
static QAngle cameraAngle; g_IEngine->GetViewAngles(camera_angle);
g_IEngine->GetViewAngles(cameraAngle);
// Set userAngle = camera angles // Doesnt work with anti-aim as well as I hoped... I guess this is as far as I can go with such a simple tauntslide
g_pUserCmd->viewangles.y = cameraAngle[1]; if (!(hacks::shared::antiaim::enabled && hacks::shared::antiaim::yaw_mode && !(side || forward)))
g_pLocalPlayer->v_OrigViewangles.y = cameraAngle[1]; g_pUserCmd->viewangles.y = camera_angle[1];
g_pLocalPlayer->v_OrigViewangles.y = camera_angle[1];
// Use silent since we dont want to prevent the player from looking around // Use silent since we dont want to prevent the player from looking around
g_pLocalPlayer->bUseSilentAngles = true; g_pLocalPlayer->bUseSilentAngles = true;
@ -337,16 +333,11 @@ void CreateMove() {
// Spams infinite autobalance spam function // Spams infinite autobalance spam function
if (auto_balance_spam) { if (auto_balance_spam) {
// Time Last used
static float auto_balance_time = 0; static float auto_balance_time = 0;
// If the timer exceeds 1 minute, jump and reset the timer
if (g_GlobalVars->curtime - 0.15 > auto_balance_time) { if (g_GlobalVars->curtime - 0.15 > auto_balance_time) {
// Use the Inf Request func
SendAutoBalanceRequest(); SendAutoBalanceRequest();
// Reset
// Reset timer
auto_balance_time = g_GlobalVars->curtime; auto_balance_time = g_GlobalVars->curtime;
} }
} }
@ -420,6 +411,7 @@ void DrawText() {
AddSideString(format("Velocity2: ", vel.Length2D())); AddSideString(format("Velocity2: ", vel.Length2D()));
AddSideString(format("flSimTime: ", LOCAL_E->var<float>(netvar.m_flSimulationTime))); AddSideString(format("flSimTime: ", LOCAL_E->var<float>(netvar.m_flSimulationTime)));
if (g_pUserCmd) AddSideString(format("command_number: ", last_cmd_number)); if (g_pUserCmd) AddSideString(format("command_number: ", last_cmd_number));
AddSideString(format("clip: ", CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1)));
/*AddSideString(colors::white, "Weapon: %s [%i]", RAW_ENT(g_pLocalPlayer->weapon())->GetClientClass()->GetName(), g_pLocalPlayer->weapon()->m_iClassID); /*AddSideString(colors::white, "Weapon: %s [%i]", RAW_ENT(g_pLocalPlayer->weapon())->GetClientClass()->GetName(), g_pLocalPlayer->weapon()->m_iClassID);
//AddSideString(colors::white, "flNextPrimaryAttack: %f", CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack)); //AddSideString(colors::white, "flNextPrimaryAttack: %f", CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flNextPrimaryAttack));
//AddSideString(colors::white, "nTickBase: %f", (float)(CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * gvars->interval_per_tick); //AddSideString(colors::white, "nTickBase: %f", (float)(CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * gvars->interval_per_tick);

View File

@ -695,6 +695,7 @@ bool CanHeadshot() {
} }
bool CanShoot() { bool CanShoot() {
float servertime, nextattack; float servertime, nextattack;
servertime = (float)(CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * g_GlobalVars->interval_per_tick; servertime = (float)(CE_INT(g_pLocalPlayer->entity, netvar.nTickBase)) * g_GlobalVars->interval_per_tick;

View File

@ -2,14 +2,4 @@
git pull origin master git pull origin master
git submodule update --remote --recursive git submodule update --remote --recursive
make clean make clean
./check-data /opt/cathook/data
## Ask user if they would like to update the menu
#read -r -p "Update menu? (Y/n) " key
## If the user chose yes, then we run the script here
#if [ $key == "y"* ] || [ $key == "Y"* ]; then
# bash update-menu
#fi