hgjkhgjhgjfdhgjg

This commit is contained in:
nullifiedcat 2016-11-05 19:47:03 +03:00
parent a59b2dd6d8
commit bcea0ce316
13 changed files with 220 additions and 6 deletions

View File

@ -19,8 +19,6 @@ priority system
Target system respect mannpower powerups
Aimbot charge detection respect powerups
FIX UNLOAD
Entity::AddEntityString
optimize
Glow Objects

View File

@ -164,4 +164,12 @@ enum hitbox {
hb_head = 0
};
enum weapons {
WP_SNIPERRIFLE = 295,
WP_ROCKET_LAUNCHER = 282,
WP_DIRECT_HIT = 284,
WP_GRENADE_LAUNCHER = 211,
WP_HUNTSMAN = 197
};
#endif /* ENUMS_H_ */

View File

@ -27,6 +27,7 @@
#include "hacks/HGlow.h"
#include "hacks/HPyroBot.h"
#include "hacks/HAimbot.h"
#include "hacks/Misc.h"
#include "usercmd.h"
#include "drawing.h"
#include "entity.h"
@ -81,9 +82,8 @@ void hack::Hk_PaintTraverse(void* p, unsigned int vp, bool fr, bool ar) {
}
bool hack::Hk_CreateMove(void* thisptr, float inputSample, CUserCmd* cmd) {
((CreateMove_t*)hooks::hkCreateMove->GetMethod(hooks::offCreateMove))(thisptr, inputSample, cmd);
bool ret = ((CreateMove_t*)hooks::hkCreateMove->GetMethod(hooks::offCreateMove))(thisptr, inputSample, cmd);
g_pLocalPlayer->Update();
bool ret = true;
for (IHack* i_hack : hack::hacks) {
if (!i_hack->CreateMove(thisptr, inputSample, cmd)) {
ret = false;
@ -146,6 +146,7 @@ void hack::Initialize() {
hack::AddHack(new HAimbot());
hack::AddHack(new HGlow());
hack::AddHack(new HPyroBot());
hack::AddHack(new Misc());
ConVar_Register();
logging::Info("Initializing NetVar tree...");
gNetvars.init();

View File

@ -44,6 +44,7 @@ void HAimbot::Create() {
this->v_bCharge = CreateConVar("u_aimbot_charge", "1", "Autoshoot only with charge ready");
this->v_bEnabledAttacking = CreateConVar("u_aimbot_enable_attack_only", "0", "Aimbot only active with attack key held");
this->v_bStrictAttack = CreateConVar("u_aimbot_strict_attack", "0", "Not attacking unless target is locked");
this->v_bProjectileAimbot = CreateConVar("u_aimbot_projectile", "1", "Projectile aimbot (EXPERIMENTAL)");
fix_silent = false;
}
@ -155,7 +156,16 @@ bool HAimbot::Aim(IClientEntity* entity, CUserCmd* cmd) {
Vector hit;
Vector angles;
GetHitboxPosition(entity, v_iHitbox->GetInt(), hit);
if (v_bPrediction->GetBool()) {
bool proj = false;
if (v_bProjectileAimbot->GetBool()) {
float speed;
bool arc;
if (GetProjectileData(g_pLocalPlayer->weapon, speed, arc)) {
proj = true;
hit = PredictProjectileAim(g_pLocalPlayer->v_Eye, entity, (hitbox)v_iHitbox->GetInt(), speed, arc);
}
}
if (!proj && v_bPrediction->GetBool()) {
PredictPosition(hit, entity);
}
IClientEntity* local = interfaces::entityList->GetClientEntity(interfaces::engineClient->GetLocalPlayer());

View File

@ -34,6 +34,7 @@ public:
ConVar* v_bCharge;
ConVar* v_bEnabledAttacking;
ConVar* v_bStrictAttack;
ConVar* v_bProjectileAimbot;
};

View File

@ -200,7 +200,9 @@ void HPyroBot::Tick(CUserCmd* cmd) {
//logging::Info("Target lost! State: %i, %i", !!target, !!ShouldTarget(target));
}
}
if (ShouldTarget(target, true) != 6 && (nPilotSearch < 100)) return;
//if (ShouldTarget(target, true) != 6 && (nPilotSearch < 100)) return;
interfaces::engineClient->ExecuteClientCmd("-attack");
return;
}
if (target != target_old) {

39
uran/src/hacks/Misc.cpp Normal file
View File

@ -0,0 +1,39 @@
/*
* Misc.cpp
*
* Created on: Nov 5, 2016
* Author: nullifiedcat
*/
#include "Misc.h"
#include "../helpers.h"
#include "../drawing.h"
#include "../localplayer.h"
#include "../fixsdk.h"
#include <icliententity.h>
#include <client_class.h>
#include <Color.h>
void Misc::Create() {
v_bDbWeaponInfo = CreateConVar("u_misc_debug_weapon", "0", "Debug info: Weapon");
}
bool Misc::CreateMove(void*, float, CUserCmd* cmd) {
return true;
}
void Misc::Destroy() {
}
void Misc::PaintTraverse(void*, unsigned int, bool, bool) {
int y = 10;
if (v_bDbWeaponInfo->GetBool()) {
if (g_pLocalPlayer->weapon) {
IClientEntity* weapon = g_pLocalPlayer->weapon;
draw::DrawString(10, y, draw::white, false, "Weapon: %s [%i]", weapon->GetClientClass()->GetName(), weapon->GetClientClass()->m_ClassID);
y += 14;
}
}
}

24
uran/src/hacks/Misc.h Normal file
View File

@ -0,0 +1,24 @@
/*
* Misc.h
*
* Created on: Nov 5, 2016
* Author: nullifiedcat
*/
#ifndef HACKS_MISC_H_
#define HACKS_MISC_H_
#include "IHack.h"
class ConVar;
class Misc : public IHack {
public:
void Create();
bool CreateMove(void*, float, CUserCmd*);
void Destroy();
void PaintTraverse(void*, unsigned int, bool, bool);
ConVar* v_bDbWeaponInfo;
};
#endif /* HACKS_MISC_H_ */

View File

@ -23,6 +23,8 @@
#include <icliententitylist.h>
#include <cdll_int.h>
#include <engine/IEngineTrace.h>
#include <client_class.h>
#include <inetchannelinfo.h>
bool IsPlayerInvulnerable(IClientEntity* player) {
int cond1 = GetEntityValue<int>(player, eoffsets.iCond);
@ -337,9 +339,52 @@ void fClampAngle(Vector& qaAng) {
}
float DistToSqr(IClientEntity* entity) {
if (entity == 0) return 0.0f;
return g_pLocalPlayer->v_Origin.DistToSqr(entity->GetAbsOrigin());
}
bool GetProjectileData(IClientEntity* weapon, float& speed, bool& arc) {
if (!weapon) return false;
switch (weapon->GetClientClass()->m_ClassID) {
case weapons::WP_DIRECT_HIT:
speed = 1980;
arc = false;
break;
case weapons::WP_ROCKET_LAUNCHER:
speed = 1100;
arc = false;
break;
case weapons::WP_GRENADE_LAUNCHER:
speed = 1217.5f;
arc = true;
break;
case weapons::WP_HUNTSMAN:
speed = 2600.0f;
arc = true;
break;
default:
return false;
}
return true;
}
Vector PredictProjectileAim(Vector origin, IClientEntity* target, hitbox hb, float speed, bool arc) {
Vector result = target->GetAbsOrigin();
int flags = GetEntityValue<int>(target, eoffsets.iFlags);
bool ground = (flags & (1 << 0));
float distance = origin.DistTo(result);
float latency = interfaces::engineClient->GetNetChannelInfo()->GetLatency(FLOW_OUTGOING) +
interfaces::engineClient->GetNetChannelInfo()->GetLatency(FLOW_INCOMING);
float time = distance / speed + latency;
if (!ground) {
result.z -= (400 * time * time);
}
result += GetEntityValue<Vector>(target, eoffsets.vVelocity) * time;
if (arc)
result.z += (400 * time * time);
return result;
}
const char* powerups[] = {
"STRENGTH",
"RESISTANCE",

View File

@ -41,6 +41,9 @@ float DistToSqr(IClientEntity* entity);
void fClampAngle(Vector& qaAng);
void fVectorAngles(Vector &forward, Vector &angles);
bool GetProjectileData(IClientEntity* weapon, float& speed, bool& arc);
Vector PredictProjectileAim(Vector origin, IClientEntity* target, hitbox hb, float speed, bool arc);
extern const char* powerups[POWERUP_COUNT];
extern const char* packs[PACK_COUNT];

View File

@ -23,6 +23,11 @@ void LocalPlayer::Update() {
v_ViewOffset = GetEntityValue<Vector>(entity, eoffsets.vViewOffset);
v_Origin = entity->GetAbsOrigin();
v_Eye = v_Origin + v_ViewOffset;
int hWeapon = GetEntityValue<int>(entity, eoffsets.hActiveWeapon);
if (hWeapon)
weapon = interfaces::entityList->GetClientEntity(hWeapon & 0xFFF);
else weapon = 0;
}
LocalPlayer* g_pLocalPlayer = 0;

9
uran/src/menu.cpp Normal file
View File

@ -0,0 +1,9 @@
/*
* menu.cpp
*
* Created on: Nov 5, 2016
* Author: nullifiedcat
*/
#include "menu.h"

69
uran/src/menu.h Normal file
View File

@ -0,0 +1,69 @@
/*
* menu.h
*
* Created on: Nov 5, 2016
* Author: nullifiedcat
*/
#ifndef MENU_H_
#define MENU_H_
#include <vector>
class ConVar;
class Changer {
public:
virtual ~Changer();
virtual void NextValue(ConVar* var);
virtual void PrevValue(ConVar* var);
};
class BoolChanger : public Changer {
public:
virtual void NextValue(ConVar* var);
virtual void PrevValue(ConVar* var);
};
class IntChanger : public Changer {
public:
virtual void NextValue(ConVar* var);
virtual void PrevValue(ConVar* var);
int m_iMinValue;
int m_iMaxValue;
int m_iStep;
};
class FloatChanger : public Changer {
public:
virtual void NextValue(ConVar* var);
virtual void PrevValue(ConVar* var);
float m_iMinValue;
float m_iMaxValue;
float m_iStep;
};
class MenuEntry {
public:
MenuEntry(ConVar* variable, Changer changer);
Changer m_Changer;
ConVar* m_ConVar;
};
class MenuArray {
public:
void AddEntry(MenuEntry entry);
const char* GetName();
std::vector<MenuEntry> m_Entries;
const char* m_Name;
};
class Menu {
public:
};
Menu g_Menu;
#endif /* MENU_H_ */