FOV update

vmread
MisterY52 4 years ago
parent 6f497bbe6b
commit 318b529135

@ -99,6 +99,11 @@ bool Entity::isGlowing()
return *(int*)(buffer + OFFSET_GLOW_ENABLE) == 7;
}
bool Entity::isZooming()
{
return *(int*)(buffer + OFFSET_ZOOMING) == 1;
}
void Entity::enableGlow(WinProcess& mem)
{
mem.Write<int>(ptr + OFFSET_GLOW_T1, 16256);
@ -205,6 +210,13 @@ QAngle CalculateBestBoneAim(WinProcess& mem, Entity& from, uintptr_t t, float ma
curweap.update(mem, from.ptr);
float BulletSpeed = curweap.get_projectile_speed();
float BulletGrav = curweap.get_projectile_gravity();
float zoom_fov = curweap.get_zoom_fov();
if (zoom_fov != 0.0f && zoom_fov != 1.0f)
{
max_fov *= zoom_fov/90.0f;
}
/*
//simple aim prediction
if (BulletSpeed > 1.f)
@ -306,6 +318,7 @@ void WeaponXEntity::update(WinProcess& mem, uint64_t LocalPlayer)
projectile_speed = mem.Read<float>(wep_entity + OFFSET_BULLET_SPEED);
projectile_scale = mem.Read<float>(wep_entity + OFFSET_BULLET_SCALE);
zoom_fov = mem.Read<float>(wep_entity + OFFSET_ZOOM_FOV);
}
float WeaponXEntity::get_projectile_speed()
@ -317,3 +330,8 @@ float WeaponXEntity::get_projectile_gravity()
{
return 750.0f * projectile_scale;
}
float WeaponXEntity::get_zoom_fov()
{
return zoom_fov;
}

@ -30,6 +30,7 @@ public:
int getHealth();
int getShield();
bool isGlowing();
bool isZooming();
Vector getAbsVelocity();
QAngle GetSwayAngles();
QAngle GetViewAngles();
@ -64,11 +65,14 @@ public:
void update(WinProcess& mem, uint64_t LocalPlayer);
float get_projectile_speed();
float get_projectile_gravity();
float get_zoom_fov();
private:
float projectile_scale;
float projectile_speed;
float zoom_fov;
};
Entity getEntity(WinProcess& mem, uintptr_t ptr);
Item getItem(WinProcess& mem, uintptr_t ptr);
bool WorldToScreen(Vector from, float* m_vMatrix, int targetWidth, int targetHeight, Vector& to);

@ -25,7 +25,7 @@ int team_player = 0;
int tmp_spec = 0, spectators = 0;
int tmp_all_spec = 0, allied_spectators = 0;
int playerId = 0;
int s_FOV = 15;
int max_fov = 15;
int toRead = 100;
int aim = false;
bool esp = false;
@ -526,7 +526,7 @@ static void AimbotLoop(WinProcess& mem)
uint64_t LocalPlayer = mem.Read<uint64_t>(g_Base + OFFSET_LOCAL_ENT);
if (LocalPlayer == 0) continue;
Entity LPlayer = getEntity(mem, LocalPlayer);
QAngle Angles = CalculateBestBoneAim(mem, LPlayer, aimentity, s_FOV);
QAngle Angles = CalculateBestBoneAim(mem, LPlayer, aimentity, max_fov);
if (Angles.x == 0 && Angles.y == 0)
{
lock=false;
@ -560,6 +560,7 @@ static void set_vars(WinProcess& mem, uint64_t add_addr)
uint64_t player_glow_addr = mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*12);
uint64_t aim_no_recoil_addr = mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*13);
uint64_t smooth_addr = mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*14);
uint64_t max_fov_addr = mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*15);
if(mem.Read<int>(spec_addr)!=1)
{
@ -589,6 +590,7 @@ static void set_vars(WinProcess& mem, uint64_t add_addr)
player_glow = mem.Read<bool>(player_glow_addr);
aim_no_recoil = mem.Read<bool>(aim_no_recoil_addr);
smooth = mem.Read<float>(smooth_addr);
max_fov = mem.Read<float>(max_fov_addr);
if(esp && next)
{

@ -8,6 +8,7 @@
#define OFFSET_SHIELD 0x170
#define OFFSET_ABS_VELOCITY 0x140 //m_vecAbsVelocity
#define OFFSET_VISIBLE_TIME 0x1A6C
#define OFFSET_ZOOMING 0x1b81 //m_bZooming
#define OFFSET_LIFE_STATE 0x770 //>0 = dead
#define OFFSET_BLEED_OUT_STATE 0x2610 //>0 = knocked
@ -27,6 +28,7 @@
#define OFFSET_WEAPON 0x1a0c //m_latestPrimaryWeapons
#define OFFSET_BULLET_SPEED 0x1e0c
#define OFFSET_BULLET_SCALE 0x1e14
#define OFFSET_ZOOM_FOV 0x1668 + 0xb4 //m_playerData + m_curZoomFOV
#define OFFSET_ITEM_GLOW 0x2A8 //m_highlightFunctionBits

@ -16,6 +16,7 @@ typedef struct player
int shield = 0;
}player;
int aim_key = VK_RBUTTON;
bool use_nvidia = true;
bool active = true;
bool ready = false;
@ -32,11 +33,12 @@ bool aiming = false; //read
uint64_t g_Base = 0; //write
float max_dist = 200.0f * 40.0f; //read
float smooth = 12.0f;
float max_fov = 15.0f;
bool valid = false; //write
bool next = false; //read write
uint64_t add[15];
uint64_t add[16];
bool k_f5 = 0;
bool k_f6 = 0;
@ -128,6 +130,7 @@ int main(int argc, char** argv)
add[12] = (uintptr_t)&player_glow;
add[13] = (uintptr_t)&aim_no_recoil;
add[14] = (uintptr_t)&smooth;
add[15] = (uintptr_t)&max_fov;
printf("add offset: 0x%I64x\n", (uint64_t)&add[0] - (uint64_t)GetModuleHandle(NULL));
Overlay ov1 = Overlay();
ov1.Start();
@ -235,7 +238,7 @@ int main(int argc, char** argv)
std::this_thread::sleep_for(std::chrono::milliseconds(130));
}
if (IsKeyDown(VK_RBUTTON))
if (IsKeyDown(aim_key))
aiming = true;
else
aiming = false;

@ -12,6 +12,7 @@ extern int spectators;
extern int allied_spectators;
extern float max_dist;
extern float smooth;
extern float max_fov;
int width;
int height;
bool k_leftclick = false;
@ -116,7 +117,7 @@ void Overlay::RenderMenu()
all_spec_disable = false;
}
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImGui::SetNextWindowSize(ImVec2(490, 250));
ImGui::SetNextWindowSize(ImVec2(490, 200));
ImGui::Begin("##title", (bool*)true, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar);
if (ImGui::BeginTabBar("Tab"))
{
@ -167,7 +168,10 @@ void Overlay::RenderMenu()
ImGui::Checkbox("Glow items", &item_glow);
ImGui::Checkbox("Glow players", &player_glow);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Config"))
{
ImGui::Text("Max distance:");
ImGui::SliderFloat("##1", &max_dist, 100.0f * 40, 800.0f * 40, "%.2f");
ImGui::SameLine();
@ -176,6 +180,8 @@ void Overlay::RenderMenu()
ImGui::Text("Smooth aim value:");
ImGui::SliderFloat("##2", &smooth, 12.0f, 150.0f, "%.2f");
ImGui::Text("Max FOV:");
ImGui::SliderFloat("##3", &max_fov, 5.0f, 250.0f, "%.2f");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Visuals"))

Loading…
Cancel
Save