jjjjjjjjjjjjjj

This commit is contained in:
nullifiedcat 2016-12-02 19:51:10 +03:00
parent 77801ccef2
commit 37f3519e6c
16 changed files with 171 additions and 30 deletions

View File

@ -88,9 +88,9 @@
</folderInfo>
<sourceEntries>
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="targeting|followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
</sourceEntries>
</configuration>
</storageModule>
@ -140,9 +140,9 @@
</folderInfo>
<sourceEntries>
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|hacks|copypasted|mem|sdk" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="targeting|followbot|hacks|copypasted|mem|sdk" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
</sourceEntries>
</configuration>
</storageModule>
@ -231,9 +231,9 @@
</folderInfo>
<sourceEntries>
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry excluding="targeting|followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/targeting"/>
</sourceEntries>
</configuration>
</storageModule>

View File

@ -2,9 +2,8 @@ MAX -> MIN priority
FIX Followbot Crash
Huntsman autoshoot
Ambassador CanHeadshot detection
Triggerbot ignores vaccinator ubers
Ambassador & Huntsman AutoHitbox fix
Proper ambassador detection (not just CTFRevolver)
No AutoShoot (aimbot/trigger) on consumables and PDAs
Improve Projectile Aimbot. A lot.
Integrate SEGVCATCH
@ -15,8 +14,6 @@ Aim Key mode (inverse/normal/disabled)
Trigger ambassador correction
ESP Icons
ESP Distance sort
Don't Aim if can't shoot
No aim when cloaked
Show sapped buildings in ESP
Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets
Fake Lag
@ -27,6 +24,7 @@ Fixing NoZoom flickering
Ambassador bodyshotting
Recalculate rifles' headshot ability (Bazaar + Precision rifles)
Auto Uber Flash
Auto trigger DR before rockets
AutoHeal
Airstuck
Critical rifles bodyshotting

View File

@ -23,23 +23,23 @@ class CDumper
char* TypeToString(SendPropType type)
{
//logging::Info("inside...");
char* ret = "UNKNOWN";
char* ret = (char *)"UNKNOWN";
//logging::Info("oh my");
//logging::Info("ret.. %s", ret);
if (type == 0) {
ret = "INT";
ret = (char *)"INT";
} else if (type == 1) {
ret = "FLOAT";
ret = (char *)"FLOAT";
} else if (type == 2) {
ret = "VECTOR3";
ret = (char *)"VECTOR3";
} else if (type == 3) {
ret = "VECTOR2";
ret = (char *)"VECTOR2";
} else if (type == 4) {
ret = "STRING";
ret = (char *)"STRING";
} else if (type == 5) {
ret = "ARRAY";
ret = (char *)"ARRAY";
} else if (type == 6) {
ret = "TABLE";
ret = (char *)"TABLE";
}
//logging::Info("returning %s", ret);
return ret;

View File

@ -41,6 +41,7 @@
#include "entity.h"
#include "localplayer.h"
#include "playerresource.h"
#include "targeting/ITargetSystem.h"
#include "profiler.h"
@ -212,6 +213,7 @@ void hack::Initialize() {
hack::InitHacks();
logging::Info("Init global settings");
g_Settings.Init();
InitTargetingConVars();
ConVar_Register();
logging::Info("Initializing NetVar tree...");
gNetvars.init();

View File

@ -10,6 +10,10 @@
#include "../helpers.h"
#include "../sdk/in_buttons.h"
#include "../usercmd.h"
#include "../logging.h"
#include "../interfaces.h"
#include "../fixsdk.h"
#include <icvar.h>
Airstuck::Airstuck() {
v_bStuck = CreateConVar("u_airstuck", "0", "Toggle airstuck");
@ -21,14 +25,17 @@ const char* Airstuck::GetName() {
bool Airstuck::CreateMove(void*, float, CUserCmd* cmd) {
// TODO Airstuck.
return true;
/*if (v_bStuck->GetBool()) {
interfaces::cvar->FindVar("net_fakeloss")->SetValue(0);
interfaces::cvar->FindVar("host_timescale")->SetValue(1.0f);
if (v_bStuck->GetBool()) {
if (cmd->buttons & (IN_ATTACK | IN_ATTACK2)) {
return true;
}
//cmd->tick_count = 0xFFFF;
//interfaces::cvar->FindVar("net_fakeloss")->SetValue(99);
interfaces::cvar->FindVar("host_timescale")->SetValue(0.001f);
}
return true;*/
return true;
}
void Airstuck::PaintTraverse(void*, unsigned int, bool, bool) {};

View File

@ -35,15 +35,15 @@ const char* FollowBot::GetName() {
// TODO
bool FollowBot::ShouldPopUber(bool force) {
int health_my = g_pLocalPlayer->health;
int health_tr = GetEntityValue<int>(interfaces::entityList->GetClientEntity(this->m_hTargetHealing), eoffsets.iHealth);
//int health_tr = GetEntityValue<int>(interfaces::entityList->GetClientEntity(this->m_hTargetHealing), eoffsets.iHealth);
if (health_my < 30) return true;
bool other_bots_have_uber = false;
//bool other_bots_have_uber = false;
for (int i = 0; i < 64 && i < interfaces::entityList->GetHighestEntityIndex(); i++) {
IClientEntity* ent = interfaces::entityList->GetClientEntity(i);
if (ent == g_pLocalPlayer->entity) continue;
if (IsFriendlyBot(ent)) {
if (GetEntityValue<char>(ent, eoffsets.iLifeState)) continue;
IClientEntity* medigun;
//IClientEntity* medigun;
// TODO
}
}
@ -122,6 +122,7 @@ void FollowBot::Tick(CUserCmd* cmd) {
owner_entity = interfaces::entityList->GetClientEntity(i);
}
}
if (!owner_entity) return;
switch (v_iBotPackage->GetInt()) {
case botpackage::BOT_FOLLOW: {

View File

@ -15,8 +15,10 @@
#include "../targethelper.h"
#include "../localplayer.h"
#include "../drawing.h"
//typedef int CBaseEntity;
#include "../targeting/ITargetSystem.h"
#include "../targeting/TargetSystemSmart.h"
#include "../targeting/TargetSystemFOV.h"
#include "../targeting/TargetSystemDistance.h"
#include "../fixsdk.h"
#include <client_class.h>
@ -35,12 +37,23 @@ bool fix_silent;
int target_lock;
enum TargetSystem_t {
SMART = 0,
FOV = 1,
DISTANCE = 2
};
ITargetSystem* target_systems[3];
const char* HAimbot::GetName() {
return "AIMBOT";
}
/* null-safe */
HAimbot::HAimbot() {
target_systems[0] = new TargetSystemSmart();
target_systems[1] = new TargetSystemFOV();
target_systems[2] = new TargetSystemDistance();
this->v_bEnabled = CreateConVar("u_aimbot_enabled", "0", "Enables aimbot. EXPERIMENTAL AND TOTALLY NOT LEGIT");
this->v_iHitbox = CreateConVar("u_aimbot_hitbox", "0", "Hitbox");
this->v_bAutoHitbox = CreateConVar("u_aimbot_autohitbox", "1", "Autohitbox");
@ -82,6 +95,8 @@ bool HAimbot::CreateMove(void*, float, CUserCmd* cmd) {
}
}
if (g_pLocalPlayer->cond_0 & cond::cloaked) return true; // TODO other kinds of cloak
if (this->v_bActiveOnlyWhenCanShoot->GetBool() && !BulletTime()) return true;
if (this->v_bEnabledAttacking->GetBool() && !(cmd->buttons & IN_ATTACK)) {
@ -100,7 +115,7 @@ bool HAimbot::CreateMove(void*, float, CUserCmd* cmd) {
if (this->v_bAmbassador->GetBool()) {
// TODO defindex check
if (g_pLocalPlayer->weapon && g_pLocalPlayer->weapon->GetClientClass()->m_ClassID == ClassID::CTFRevolver) {
if ((interfaces::gvars->curtime - GetEntityValue<float>(g_pLocalPlayer->weapon, eoffsets.flLastFireTime)) <= 0.95) {
if ((interfaces::gvars->curtime - GetEntityValue<float>(g_pLocalPlayer->weapon, eoffsets.flLastFireTime)) <= 1.0) {
return true;
}
}

View File

@ -62,7 +62,7 @@ void CC_AddRage(const CCommand& args) {
}
void DumpRecvTable(IClientEntity* ent, RecvTable* table, int depth, const char* ft) {
bool forcetable = strlen(ft);
//bool forcetable = strlen(ft);
if (!ft || !strcmp(ft, table->GetName()))
logging::Info("==== TABLE: %s", table->GetName());
for (int i = 0; i < table->GetNumProps(); i++) {
@ -165,7 +165,7 @@ void CC_SayInfo(const CCommand& args) {
int id = atoi(args.Arg(1));
player_info_t info;
if (!interfaces::engineClient->GetPlayerInfo(id, &info)) return;
char* buf = new char[256];
//char* buf = new char[256];
}

View File

@ -0,0 +1,22 @@
/*
* ITargetSystem.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "ITargetSystem.h"
#include "../helpers.h"
TargetingConVars* g_pTargetingConVars = 0;
ITargetSystem::~ITargetSystem() {}
void InitTargetingConVars() {
g_pTargetingConVars = new TargetingConVars();
g_pTargetingConVars->bTargetInvisible = CreateConVar("u_target_ignore_cloak", "0", "Ignore cloak when targeting");
g_pTargetingConVars->flMaxFOV = CreateConVar("u_target_max_fov", "0", "Maximum FOV when targeting");
g_pTargetingConVars->iMaxDistance = CreateConVar("u_target_max_distance", "0", "Maximum distance when targeting");
}

View File

@ -8,6 +8,8 @@
#ifndef ITARGETSYSTEM_H_
#define ITARGETSYSTEM_H_
// TODO Targeting.
class ITargetSystem {
public:
virtual ~ITargetSystem();
@ -15,4 +17,15 @@ public:
virtual int GetScore(int idx) = 0;
};
class ConVar;
struct TargetingConVars {
ConVar* bTargetInvisible;
ConVar* flMaxFOV;
ConVar* iMaxDistance;
};
extern TargetingConVars* g_pTargetingConVars;
void InitTargetingConVars();
#endif /* ITARGETSYSTEM_H_ */

View File

@ -0,0 +1,21 @@
/*
* TargetSystemDistance.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "TargetSystemDistance.h"
bool TargetSystemDistance::ShouldTarget(int idx) {
//CachedEntity* ent = gEntityCache.GetEntity(idx);
//float fov = GetFov(g_pLocalPlayer->v_OrigViewangles, g_pLocalPlayer->v_Eye, GetHitboxPosition(ent->m_pEntity, ));
return false;
}
int TargetSystemDistance::GetScore(int idx) {
return 0;
}

View File

@ -0,0 +1,19 @@
/*
* TargetSystemDistance.h
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#ifndef TARGETSYSTEMDISTANCE_H_
#define TARGETSYSTEMDISTANCE_H_
#include "ITargetSystem.h"
class TargetSystemDistance : public ITargetSystem {
public:
bool ShouldTarget(int idx);
int GetScore(int idx);
};
#endif /* TARGETSYSTEMDISTANCE_H_ */

View File

@ -0,0 +1,18 @@
/*
* TargetSystemFOV.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#include "TargetSystemFOV.h"
bool TargetSystemFOV::ShouldTarget(int idx) {
//CachedEntity* ent = gEntityCache.GetEntity(idx);
//float fov = GetFov(g_pLocalPlayer->v_OrigViewangles, g_pLocalPlayer->v_Eye, GetHitboxPosition(ent->m_pEntity, ));
return false;
}
int TargetSystemFOV::GetScore(int idx) {
return 0;
}

View File

@ -0,0 +1,19 @@
/*
* TargetSystemFOV.h
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#ifndef TARGETSYSTEMFOV_H_
#define TARGETSYSTEMFOV_H_
#include "ITargetSystem.h"
class TargetSystemFOV : public ITargetSystem {
public:
bool ShouldTarget(int idx);
int GetScore(int idx);
};
#endif /* TARGETSYSTEMFOV_H_ */

View File

@ -5,6 +5,8 @@
* Author: nullifiedcat
*/
#include "TargetSystemSmart.h"
bool TargetSystemSmart::ShouldTarget(int idx) {
return false;
}

View File

@ -8,6 +8,10 @@
#ifndef TARGETSYSTEMSMART_H_
#define TARGETSYSTEMSMART_H_
#include "ITargetSystem.h"
class ConVar;
class TargetSystemSmart : public ITargetSystem {
public:
bool ShouldTarget(int idx);