Compare commits
10 Commits
1d94704814
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1da95a4c35 | |||
| 40f014de59 | |||
| 0b9c748444 | |||
| dcdd090677 | |||
| f885095c39 | |||
| 51c3b979ea | |||
| 6a640a716c | |||
| 66b4abf888 | |||
| 5bf0dfce70 | |||
| cbea54c5ce |
2
Makefile
2
Makefile
@@ -9,7 +9,7 @@ IMGUI_INCLUDES=-I$(IMGUI_DIR)
|
||||
IMGUI_SRCS=$(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl2.cpp
|
||||
IMGUI_OBJS=$(patsubst %.cpp,%.o,$(IMGUI_SRCS))
|
||||
|
||||
OBJS=obj/main.c.o obj/globals.c.o obj/settings.c.o obj/hooks.c.o obj/detour.c.o obj/util.c.o obj/features/movement.c.o obj/features/anti_aim.c.o obj/features/fov.c.o obj/features/namechanger.c.o obj/features/esp.c.o obj/features/chams.c.o obj/features/aim.c.o obj/features/misc.c.o obj/features/thirdperson.c.o obj/game_detection.c.o obj/menu.c.o $(IMGUI_OBJS)
|
||||
OBJS=obj/main.c.o obj/globals.c.o obj/settings.c.o obj/hooks.c.o obj/detour.c.o obj/util.c.o obj/features/movement.c.o obj/features/anti_aim.c.o obj/features/fov.c.o obj/features/namechanger.c.o obj/features/esp.c.o obj/features/chams.c.o obj/features/aim.c.o obj/features/misc.c.o obj/features/thirdperson.c.o obj/features/no_recoil.c.o obj/game_detection.c.o obj/menu.c.o $(IMGUI_OBJS)
|
||||
BIN=libhlcheat.so
|
||||
|
||||
.PHONY: clean all inject
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
#+TOC: headlines 2
|
||||
|
||||
* WARNING
|
||||
TO USE THIS YOU MUST BE RUNNING THE LEGACY BETA
|
||||
|
||||
* Description
|
||||
Simple linux cheat for most goldsrc games, made in C.
|
||||
|
||||
|
||||
@@ -33,6 +33,13 @@
|
||||
#define PRIORITY_MEDIUM 2
|
||||
#define PRIORITY_HIGH 3
|
||||
|
||||
// Weapon IDs
|
||||
#define WEAPON_GLOCK 17
|
||||
#define WEAPON_DEAGLE 26
|
||||
#define WEAPON_AK47 28
|
||||
#define WEAPON_M4A1 22
|
||||
#define WEAPON_AWP 33
|
||||
|
||||
extern const char* hitbox_options[];
|
||||
extern int current_hitbox;
|
||||
|
||||
@@ -53,68 +60,104 @@ typedef struct {
|
||||
float radius;
|
||||
} hitbox_t;
|
||||
|
||||
bool get_hitbox(cl_entity_t* ent, int hitbox_index, hitbox_t* out_hitbox) {
|
||||
if (!ent || !ent->model || !out_hitbox)
|
||||
bool get_hitbox(cl_entity_t* ent, int hitbox_id, hitbox_t* out_hitbox) {
|
||||
if (!ent || !out_hitbox) {
|
||||
return false;
|
||||
}
|
||||
|
||||
studiohdr_t* studio_model = (studiohdr_t*)i_enginestudio->Mod_Extradata(ent->model);
|
||||
if (!studio_model)
|
||||
return false;
|
||||
out_hitbox->radius = 5.0f;
|
||||
|
||||
mstudiobbox_t* studio_box = NULL;
|
||||
if (studio_model->hitboxindex) {
|
||||
studio_box = (mstudiobbox_t*)((byte*)studio_model + studio_model->hitboxindex);
|
||||
if (hitbox_index >= studio_model->numhitboxes || hitbox_index < 0)
|
||||
return false;
|
||||
bool is_ak47 = (g_currentWeaponID == WEAPON_AK47);
|
||||
|
||||
studio_box += hitbox_index;
|
||||
studiohdr_t* studio = NULL;
|
||||
if (ent->model) {
|
||||
studio = (studiohdr_t*)i_enginestudio->Mod_Extradata(ent->model);
|
||||
}
|
||||
|
||||
switch (hitbox_id) {
|
||||
case 0: {
|
||||
vec3_t view_offset;
|
||||
view_offset.x = 0.0f;
|
||||
view_offset.y = 0.0f;
|
||||
|
||||
if (is_ak47) {
|
||||
view_offset.z = 26.0f;
|
||||
} else {
|
||||
return false;
|
||||
view_offset.z = 27.0f;
|
||||
}
|
||||
|
||||
vec_copy(out_hitbox->mins, studio_box->bbmin);
|
||||
vec_copy(out_hitbox->maxs, studio_box->bbmax);
|
||||
out_hitbox->origin = vec_add(ent->origin, view_offset);
|
||||
out_hitbox->radius = 7.0f;
|
||||
|
||||
vec3_t center;
|
||||
center.x = (out_hitbox->mins.x + out_hitbox->maxs.x) * 0.5f;
|
||||
center.y = (out_hitbox->mins.y + out_hitbox->maxs.y) * 0.5f;
|
||||
center.z = (out_hitbox->mins.z + out_hitbox->maxs.z) * 0.5f;
|
||||
vec3_t head_offset;
|
||||
head_offset.x = 0.0f;
|
||||
head_offset.y = 0.0f;
|
||||
head_offset.z = 0.0f;
|
||||
|
||||
vec3_t angles;
|
||||
vec_copy(angles, ent->angles);
|
||||
|
||||
int bone = studio_box->bone;
|
||||
if (bone >= 0 && bone < studio_model->numbones) {
|
||||
mstudiobone_t* pbone = (mstudiobone_t*)((byte*)studio_model + studio_model->boneindex);
|
||||
pbone += bone;
|
||||
|
||||
angles[0] = pbone->value[0];
|
||||
angles[1] = pbone->value[1];
|
||||
angles[2] = pbone->value[2];
|
||||
if (is_ak47) {
|
||||
head_offset.z = -1.0f;
|
||||
}
|
||||
|
||||
vec3_t forward, right, up;
|
||||
i_engine->pfnAngleVectors(angles, forward, right, up);
|
||||
out_hitbox->origin = vec_add(out_hitbox->origin, head_offset);
|
||||
|
||||
vec3_t offset;
|
||||
offset.x = center.x * forward.x + center.y * right.x + center.z * up.x;
|
||||
offset.y = center.x * forward.y + center.y * right.y + center.z * up.y;
|
||||
offset.z = center.x * forward.z + center.y * right.z + center.z * up.z;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, offset);
|
||||
|
||||
if (hitbox_index == HITBOX_HEAD) {
|
||||
out_hitbox->origin.z += 8.0f;
|
||||
static int debug_counter = 0;
|
||||
if (debug_counter++ % 500 == 0) {
|
||||
i_engine->Con_Printf("Head hitbox: Origin(%.1f,%.1f,%.1f) Radius(%.1f) WeaponID: %d\n",
|
||||
out_hitbox->origin.x, out_hitbox->origin.y, out_hitbox->origin.z,
|
||||
out_hitbox->radius, g_currentWeaponID);
|
||||
}
|
||||
|
||||
vec3_t size;
|
||||
size.x = fabs(out_hitbox->maxs.x - out_hitbox->mins.x) * 0.5f;
|
||||
size.y = fabs(out_hitbox->maxs.y - out_hitbox->mins.y) * 0.5f;
|
||||
size.z = fabs(out_hitbox->maxs.z - out_hitbox->mins.z) * 0.5f;
|
||||
|
||||
out_hitbox->radius = sqrtf(size.x * size.x + size.y * size.y + size.z * size.z);
|
||||
|
||||
return true;
|
||||
}
|
||||
case 1: {
|
||||
vec3_t chest_offset;
|
||||
chest_offset.x = 0.0f;
|
||||
chest_offset.y = 0.0f;
|
||||
chest_offset.z = 18.0f;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, chest_offset);
|
||||
out_hitbox->radius = 10.0f;
|
||||
return true;
|
||||
}
|
||||
case 2: {
|
||||
vec3_t stomach_offset;
|
||||
stomach_offset.x = 0.0f;
|
||||
stomach_offset.y = 0.0f;
|
||||
stomach_offset.z = 12.0f;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, stomach_offset);
|
||||
out_hitbox->radius = 9.0f;
|
||||
return true;
|
||||
}
|
||||
case 3: {
|
||||
vec3_t pelvis_offset;
|
||||
pelvis_offset.x = 0.0f;
|
||||
pelvis_offset.y = 0.0f;
|
||||
pelvis_offset.z = 6.0f;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, pelvis_offset);
|
||||
out_hitbox->radius = 8.0f;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
if (is_ak47) {
|
||||
vec3_t fallback_offset;
|
||||
fallback_offset.x = 0.0f;
|
||||
fallback_offset.y = 0.0f;
|
||||
fallback_offset.z = 20.0f;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, fallback_offset);
|
||||
} else {
|
||||
vec3_t fallback_offset;
|
||||
fallback_offset.x = 0.0f;
|
||||
fallback_offset.y = 0.0f;
|
||||
fallback_offset.z = 25.0f;
|
||||
|
||||
out_hitbox->origin = vec_add(ent->origin, fallback_offset);
|
||||
}
|
||||
out_hitbox->radius = 8.0f;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_hitbox_visible(vec3_t eye_pos, hitbox_t* hitbox) {
|
||||
@@ -123,20 +166,27 @@ bool is_hitbox_visible(vec3_t eye_pos, hitbox_t* hitbox) {
|
||||
|
||||
pmtrace_t* trace = i_engine->PM_TraceLine(eye_pos, hitbox->origin, PM_TRACELINE_PHYSENTSONLY, 2, -1);
|
||||
|
||||
if (g_settings.aimbot_rage_mode && trace->fraction > 0.5f) {
|
||||
return true;
|
||||
static int trace_debug = 0;
|
||||
if (trace_debug++ % 500 == 0) {
|
||||
printf("Trace: fraction=%.3f, ent=%d\n", trace->fraction, trace->ent);
|
||||
}
|
||||
|
||||
if (trace->fraction < 1.0f && trace->ent <= 0)
|
||||
if (trace->fraction < 0.9f) {
|
||||
if (trace->ent <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (trace->ent > 0) {
|
||||
const int ent_idx = i_pmove->physents[trace->ent].info;
|
||||
if (get_player(ent_idx))
|
||||
cl_entity_t* hit_entity = get_player(ent_idx);
|
||||
|
||||
if (hit_entity) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -152,70 +202,43 @@ int get_target_priority(cl_entity_t* ent) {
|
||||
if (!ent)
|
||||
return PRIORITY_NONE;
|
||||
|
||||
if (g_settings.aimbot_rage_mode) {
|
||||
return PRIORITY_HIGH;
|
||||
}
|
||||
|
||||
return PRIORITY_MEDIUM;
|
||||
}
|
||||
|
||||
static bool get_best_hitbox(cl_entity_t* ent, vec3_t eye_pos, hitbox_t* out_hitbox) {
|
||||
if (!ent || !out_hitbox)
|
||||
return false;
|
||||
|
||||
if (current_hitbox == HITBOX_NEAREST) {
|
||||
float best_distance = 9999.0f;
|
||||
bool found_hitbox = false;
|
||||
|
||||
for (int i = 0; i < MAX_HITBOXES; i++) {
|
||||
hitbox_t temp_hitbox;
|
||||
if (get_hitbox(ent, i, &temp_hitbox)) {
|
||||
if (is_hitbox_visible(eye_pos, &temp_hitbox)) {
|
||||
vec3_t to_hitbox = vec_sub(temp_hitbox.origin, eye_pos);
|
||||
float distance = vec_len2d(to_hitbox);
|
||||
|
||||
if (distance < best_distance) {
|
||||
best_distance = distance;
|
||||
*out_hitbox = temp_hitbox;
|
||||
found_hitbox = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return found_hitbox;
|
||||
}
|
||||
else {
|
||||
if (get_hitbox(ent, current_hitbox, out_hitbox)) {
|
||||
return is_hitbox_visible(eye_pos, out_hitbox);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static target_t get_best_target(vec3_t viewangles, vec3_t eye_pos) {
|
||||
target_t best_target = {NULL, 0.0f, {0, 0, 0}, false, PRIORITY_NONE, 9999.0f};
|
||||
float best_score = 0.0f;
|
||||
float max_fov = g_settings.aimbot_fov;
|
||||
|
||||
if (g_settings.aimbot_rage_mode && max_fov < 90.0f) {
|
||||
max_fov = 90.0f;
|
||||
}
|
||||
|
||||
for (int i = 1; i <= i_engine->GetMaxClients(); i++) {
|
||||
cl_entity_t* ent = get_player(i);
|
||||
|
||||
if (!ent || !is_alive(ent))
|
||||
continue;
|
||||
|
||||
if (!g_settings.aimbot_friendly_fire && is_friend(ent))
|
||||
if (!g_settings.aimbot_team_attack && is_friend(ent))
|
||||
continue;
|
||||
|
||||
hitbox_t target_hitbox;
|
||||
bool hitbox_found = false;
|
||||
|
||||
hitbox_found = get_best_hitbox(ent, eye_pos, &target_hitbox);
|
||||
if (current_hitbox == HITBOX_NEAREST) {
|
||||
const int hitbox_priority[] = {HITBOX_HEAD, HITBOX_CHEST, HITBOX_STOMACH, HITBOX_PELVIS};
|
||||
|
||||
for (int h = 0; h < 4; h++) {
|
||||
if (get_hitbox(ent, hitbox_priority[h], &target_hitbox)) {
|
||||
if (is_hitbox_visible(eye_pos, &target_hitbox)) {
|
||||
hitbox_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hitbox_found = get_hitbox(ent, current_hitbox, &target_hitbox);
|
||||
if (hitbox_found) {
|
||||
hitbox_found = is_hitbox_visible(eye_pos, &target_hitbox);
|
||||
}
|
||||
}
|
||||
|
||||
if (!hitbox_found)
|
||||
continue;
|
||||
@@ -236,16 +259,12 @@ static target_t get_best_target(vec3_t viewangles, vec3_t eye_pos) {
|
||||
|
||||
float fov_score = 1.0f - (fov_distance / max_fov);
|
||||
|
||||
float priority_score = 0.0f;
|
||||
if (g_settings.aimbot_rage_mode) {
|
||||
int priority = get_target_priority(ent);
|
||||
priority_score = priority / (float)PRIORITY_HIGH;
|
||||
}
|
||||
float priority_score = priority / (float)PRIORITY_HIGH;
|
||||
|
||||
float final_score = fov_score;
|
||||
if (g_settings.aimbot_rage_mode) {
|
||||
final_score = (fov_score * 0.5f) + (priority_score * 0.5f);
|
||||
}
|
||||
float distance_score = 1.0f - fmin(1.0f, distance / 3000.0f);
|
||||
|
||||
float final_score = (fov_score * 0.6f) + (priority_score * 0.3f) + (distance_score * 0.1f);
|
||||
|
||||
if (final_score > best_score) {
|
||||
best_score = final_score;
|
||||
@@ -253,7 +272,7 @@ static target_t get_best_target(vec3_t viewangles, vec3_t eye_pos) {
|
||||
best_target.fov = fov_distance;
|
||||
vec_copy(best_target.aim_point, target_hitbox.origin);
|
||||
best_target.is_visible = true;
|
||||
best_target.priority = get_target_priority(ent);
|
||||
best_target.priority = priority;
|
||||
best_target.distance = distance;
|
||||
}
|
||||
}
|
||||
@@ -261,96 +280,138 @@ static target_t get_best_target(vec3_t viewangles, vec3_t eye_pos) {
|
||||
return best_target;
|
||||
}
|
||||
|
||||
#define RECOIL_DETECTION_MULT 1.0f
|
||||
#define RECOIL_DECAY_RATE 0.5f
|
||||
|
||||
static vec3_t s_last_viewangles = {0, 0, 0};
|
||||
static vec3_t s_punch_angles = {0, 0, 0};
|
||||
static int s_firing_frames = 0;
|
||||
|
||||
void aimbot(usercmd_t* cmd) {
|
||||
if (!g_settings.aimbot_enabled)
|
||||
return;
|
||||
|
||||
bool should_run_aimbot = true;
|
||||
bool should_autoshoot = g_settings.aimbot_autoshoot;
|
||||
|
||||
switch (0) {
|
||||
case 0:
|
||||
should_run_aimbot = true;
|
||||
break;
|
||||
case 1:
|
||||
should_run_aimbot = (cmd->buttons & IN_ATTACK) != 0;
|
||||
break;
|
||||
case 2:
|
||||
should_run_aimbot = (cmd->buttons & IN_ATTACK2) != 0;
|
||||
break;
|
||||
default:
|
||||
should_run_aimbot = true;
|
||||
}
|
||||
|
||||
if (!should_run_aimbot && !g_settings.aimbot_rage_mode)
|
||||
if (!is_alive(localplayer))
|
||||
return;
|
||||
|
||||
if (g_settings.aimbot_rage_mode)
|
||||
should_run_aimbot = true;
|
||||
if (g_settings.aimbot_require_key && !(cmd->buttons & IN_ATTACK))
|
||||
return;
|
||||
|
||||
bool can_fire = can_shoot();
|
||||
bool can_fire = g_flCurrentTime >= g_flNextPrimaryAttack;
|
||||
|
||||
vec3_t view_height;
|
||||
i_engine->pEventAPI->EV_LocalPlayerViewheight(view_height);
|
||||
vec3_t eye_pos = vec_add(localplayer->origin, view_height);
|
||||
vec3_t eye_pos;
|
||||
vec_copy(eye_pos, localplayer->origin);
|
||||
eye_pos.z += 28.0f;
|
||||
|
||||
vec3_t viewangles;
|
||||
i_engine->GetViewAngles(viewangles);
|
||||
|
||||
static int shot_count = 0;
|
||||
static float last_shot_time = 0.0f;
|
||||
|
||||
if (cmd->buttons & IN_ATTACK) {
|
||||
if (g_flCurrentTime - last_shot_time > 0.08f) {
|
||||
shot_count++;
|
||||
last_shot_time = g_flCurrentTime;
|
||||
|
||||
if (shot_count % 5 == 0) {
|
||||
i_engine->Con_Printf("Shot counter: %d shots in spray\n", shot_count);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_flCurrentTime - last_shot_time > 0.25f) {
|
||||
if (shot_count > 3) {
|
||||
i_engine->Con_Printf("Reset shot counter from %d\n", shot_count);
|
||||
}
|
||||
shot_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd->buttons & IN_ATTACK) {
|
||||
if (g_currentWeaponID == WEAPON_AK47) {
|
||||
viewangles.x -= g_punchAngles[0] * 1.2f;
|
||||
viewangles.y -= g_punchAngles[1] * 0.8f;
|
||||
|
||||
if (shot_count >= 3) {
|
||||
float extra_comp = CLAMP((shot_count - 2) * 0.3f, 0.0f, 3.0f);
|
||||
viewangles.x -= extra_comp;
|
||||
|
||||
if (shot_count % 5 == 0) {
|
||||
i_engine->Con_Printf("AK-47 Extra comp: %.1f degrees down\n", extra_comp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewangles.x -= g_punchAngles[0] * 0.6f;
|
||||
viewangles.y -= g_punchAngles[1] * 0.4f;
|
||||
}
|
||||
}
|
||||
|
||||
target_t best_target = get_best_target(viewangles, eye_pos);
|
||||
|
||||
if (!best_target.entity) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec3_t aim_direction = vec_sub(best_target.aim_point, eye_pos);
|
||||
vec3_t aim_angles = vec_to_ang(aim_direction);
|
||||
|
||||
if (g_currentWeaponID == WEAPON_AK47) {
|
||||
if (shot_count > 0) {
|
||||
float ak_compensation = CLAMP(shot_count * 0.25f, 0.0f, 6.0f);
|
||||
|
||||
aim_angles.x -= ak_compensation;
|
||||
|
||||
if (shot_count % 5 == 0) {
|
||||
i_engine->Con_Printf("AK-47 aim adjust: Shot %d, Aiming %.1f lower\n",
|
||||
shot_count, ak_compensation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vec3_t engine_viewangles;
|
||||
i_engine->GetViewAngles(engine_viewangles);
|
||||
|
||||
vec3_t adjusted_viewangles = engine_viewangles;
|
||||
if (g_settings.aimbot_norecoil) {
|
||||
adjusted_viewangles.x += g_punchAngles.x * AIM_PUNCH_MULT;
|
||||
adjusted_viewangles.y += g_punchAngles.y * AIM_PUNCH_MULT;
|
||||
adjusted_viewangles.z += g_punchAngles.z * AIM_PUNCH_MULT;
|
||||
if (g_settings.aimbot_smoothing_enabled && !g_settings.aimbot_silent) {
|
||||
vec3_t delta;
|
||||
delta.x = aim_angles.x - engine_viewangles.x;
|
||||
delta.y = aim_angles.y - engine_viewangles.y;
|
||||
delta.z = 0.0f;
|
||||
|
||||
if (delta.y > 180.0f) delta.y -= 360.0f;
|
||||
if (delta.y < -180.0f) delta.y += 360.0f;
|
||||
|
||||
float smooth_factor = g_settings.aimbot_smooth;
|
||||
|
||||
if (g_currentWeaponID == WEAPON_AK47 && shot_count > 1) {
|
||||
smooth_factor *= 0.7f;
|
||||
}
|
||||
|
||||
target_t best_target = get_best_target(adjusted_viewangles, eye_pos);
|
||||
|
||||
if (best_target.entity && best_target.is_visible) {
|
||||
vec3_t to_target = vec_sub(best_target.aim_point, eye_pos);
|
||||
vec3_t aim_angles = vec_to_ang(to_target);
|
||||
|
||||
vec3_t delta = vec_sub(aim_angles, engine_viewangles);
|
||||
vec_norm(&delta);
|
||||
ang_clamp(&delta);
|
||||
|
||||
if (g_settings.aimbot_silent) {
|
||||
cmd->viewangles.x = engine_viewangles.x + delta.x;
|
||||
cmd->viewangles.y = engine_viewangles.y + delta.y;
|
||||
cmd->viewangles.z = engine_viewangles.z + delta.z;
|
||||
} else {
|
||||
float smoothing = SMOOTHING_FACTOR;
|
||||
|
||||
smoothing = g_settings.aimbot_smooth > 0 ? g_settings.aimbot_smooth : SMOOTHING_FACTOR;
|
||||
|
||||
if (g_settings.aimbot_rage_mode) {
|
||||
smoothing = 1.2f;
|
||||
if (best_target.fov < g_settings.aimbot_fov * 0.5f) {
|
||||
smooth_factor *= 0.6f;
|
||||
}
|
||||
|
||||
engine_viewangles.x += delta.x / smoothing;
|
||||
engine_viewangles.y += delta.y / smoothing;
|
||||
engine_viewangles.z += delta.z / smoothing;
|
||||
if (smooth_factor < 1.0f) smooth_factor = 1.0f;
|
||||
|
||||
ang_clamp(&engine_viewangles);
|
||||
vec3_t smooth_angles;
|
||||
smooth_angles.x = engine_viewangles.x + delta.x / smooth_factor;
|
||||
smooth_angles.y = engine_viewangles.y + delta.y / smooth_factor;
|
||||
smooth_angles.z = 0.0f;
|
||||
|
||||
ang_clamp(&smooth_angles);
|
||||
|
||||
engine_viewangles = smooth_angles;
|
||||
|
||||
i_engine->SetViewAngles(engine_viewangles);
|
||||
|
||||
cmd->viewangles.x = engine_viewangles.x;
|
||||
cmd->viewangles.y = engine_viewangles.y;
|
||||
cmd->viewangles.z = engine_viewangles.z;
|
||||
}
|
||||
else if (g_settings.aimbot_silent) {
|
||||
vec_copy(cmd->viewangles, aim_angles);
|
||||
}
|
||||
else {
|
||||
engine_viewangles = aim_angles;
|
||||
i_engine->SetViewAngles(engine_viewangles);
|
||||
}
|
||||
|
||||
if (should_autoshoot && can_fire) {
|
||||
if (g_settings.aimbot_rage_mode) {
|
||||
if (g_settings.aimbot_autoshoot && best_target.is_visible && can_fire) {
|
||||
cmd->buttons |= IN_ATTACK;
|
||||
} else {
|
||||
float aim_error = sqrtf(delta.x * delta.x + delta.y * delta.y);
|
||||
if (aim_error < 5.0f) {
|
||||
cmd->buttons |= IN_ATTACK;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (should_autoshoot) {
|
||||
cmd->buttons &= ~IN_ATTACK;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,25 @@
|
||||
#include "../include/sdk.h"
|
||||
#include "../include/settings.h"
|
||||
#include "../include/util.h"
|
||||
#include "../include/globals.h"
|
||||
|
||||
#define AA_PITCH_NONE 0
|
||||
#define AA_PITCH_DOWN 1
|
||||
#define AA_PITCH_UP 2
|
||||
#define AA_PITCH_ZERO 3
|
||||
#define AA_PITCH_JITTER 4
|
||||
#define AA_PITCH_CUSTOM 5
|
||||
|
||||
#define AA_YAW_NONE 0
|
||||
#define AA_YAW_BACKWARD 1
|
||||
#define AA_YAW_SPIN 2
|
||||
#define AA_YAW_JITTER 3
|
||||
#define AA_YAW_SIDEWAYS 4
|
||||
#define AA_YAW_CUSTOM 5
|
||||
|
||||
static float spin_angle = 0.0f;
|
||||
static float last_update_time = 0.0f;
|
||||
static float jitter_next_update = 0.0f;
|
||||
|
||||
float random_float(float min, float max) {
|
||||
return (max - min) * ((float)rand() / (float)RAND_MAX) + min;
|
||||
@@ -28,17 +47,160 @@ bool isSpacebarPressed() {
|
||||
return pressed;
|
||||
}
|
||||
|
||||
void anti_aim(usercmd_t* cmd) {
|
||||
if (cmd->buttons & IN_ATTACK || cmd->buttons & IN_USE) {
|
||||
if (cmd->buttons & IN_ATTACK) {
|
||||
i_engine->pfnClientCmd("echo \"Attack detected. Spinbot stopped.\"");
|
||||
} else if (cmd->buttons & IN_USE) {
|
||||
i_engine->pfnClientCmd("echo \"Use key detected. Spinbot stopped.\"");
|
||||
}
|
||||
return;
|
||||
bool is_key_pressed(int key_code) {
|
||||
if (key_code <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!g_settings.antiaim) {
|
||||
Display* display = XOpenDisplay(NULL);
|
||||
if (!display) {
|
||||
return false;
|
||||
}
|
||||
|
||||
char keys_return[32];
|
||||
XQueryKeymap(display, keys_return);
|
||||
|
||||
KeyCode kc;
|
||||
if (key_code >= 'A' && key_code <= 'Z') {
|
||||
kc = XKeysymToKeycode(display, XK_a + (key_code - 'A'));
|
||||
} else if (key_code >= 'a' && key_code <= 'z') {
|
||||
kc = XKeysymToKeycode(display, XK_a + (key_code - 'a'));
|
||||
} else {
|
||||
switch (key_code) {
|
||||
case K_SPACE: kc = XKeysymToKeycode(display, XK_space); break;
|
||||
case K_CTRL: kc = XKeysymToKeycode(display, XK_Control_L); break;
|
||||
case K_SHIFT: kc = XKeysymToKeycode(display, XK_Shift_L); break;
|
||||
case K_ALT: kc = XKeysymToKeycode(display, XK_Alt_L); break;
|
||||
case K_TAB: kc = XKeysymToKeycode(display, XK_Tab); break;
|
||||
default: kc = XKeysymToKeycode(display, key_code);
|
||||
}
|
||||
}
|
||||
|
||||
bool pressed = (keys_return[kc >> 3] & (1 << (kc & 7))) != 0;
|
||||
XCloseDisplay(display);
|
||||
return pressed;
|
||||
}
|
||||
|
||||
void apply_pitch_anti_aim(vec3_t* view_angles, int pitch_mode, float custom_pitch) {
|
||||
switch (pitch_mode) {
|
||||
case AA_PITCH_DOWN:
|
||||
view_angles->x = 89.0f;
|
||||
break;
|
||||
case AA_PITCH_UP:
|
||||
view_angles->x = -89.0f;
|
||||
break;
|
||||
case AA_PITCH_ZERO:
|
||||
view_angles->x = 0.0f;
|
||||
break;
|
||||
case AA_PITCH_JITTER: {
|
||||
static bool flip_pitch = false;
|
||||
if (flip_pitch) {
|
||||
view_angles->x = 89.0f;
|
||||
} else {
|
||||
view_angles->x = -89.0f;
|
||||
}
|
||||
|
||||
if (g_flCurrentTime > jitter_next_update) {
|
||||
flip_pitch = !flip_pitch;
|
||||
jitter_next_update = g_flCurrentTime + random_float(0.1f, 0.3f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AA_PITCH_CUSTOM:
|
||||
view_angles->x = CLAMP(custom_pitch, -89.0f, 89.0f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void apply_yaw_anti_aim(vec3_t* view_angles, int yaw_mode, float custom_yaw, float speed, float jitter_range) {
|
||||
float time_now;
|
||||
float time_delta;
|
||||
static bool is_left = true;
|
||||
|
||||
switch (yaw_mode) {
|
||||
case AA_YAW_BACKWARD:
|
||||
view_angles->y += 180.0f;
|
||||
break;
|
||||
case AA_YAW_SPIN:
|
||||
time_now = g_flCurrentTime;
|
||||
time_delta = time_now - last_update_time;
|
||||
|
||||
spin_angle += time_delta * speed;
|
||||
|
||||
if (spin_angle > 360.0f) {
|
||||
spin_angle -= 360.0f;
|
||||
}
|
||||
|
||||
view_angles->y = spin_angle;
|
||||
|
||||
last_update_time = time_now;
|
||||
break;
|
||||
case AA_YAW_JITTER:
|
||||
if (g_flCurrentTime > jitter_next_update) {
|
||||
view_angles->y += random_float(-jitter_range, jitter_range);
|
||||
jitter_next_update = g_flCurrentTime + random_float(0.1f, 0.3f);
|
||||
}
|
||||
break;
|
||||
case AA_YAW_SIDEWAYS:
|
||||
if (g_flCurrentTime > jitter_next_update) {
|
||||
is_left = !is_left;
|
||||
jitter_next_update = g_flCurrentTime + random_float(0.5f, 1.5f);
|
||||
}
|
||||
|
||||
if (is_left) {
|
||||
view_angles->y += 90.0f;
|
||||
} else {
|
||||
view_angles->y -= 90.0f;
|
||||
}
|
||||
break;
|
||||
case AA_YAW_CUSTOM:
|
||||
view_angles->y = custom_yaw;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void apply_lby_breaker(vec3_t* view_angles, bool enable_breaker) {
|
||||
if (!enable_breaker)
|
||||
return;
|
||||
|
||||
static bool lby_update = false;
|
||||
static float next_lby_update = 0.0f;
|
||||
|
||||
if (g_flCurrentTime > next_lby_update) {
|
||||
lby_update = !lby_update;
|
||||
next_lby_update = g_flCurrentTime + 1.1f;
|
||||
|
||||
if (lby_update) {
|
||||
view_angles->y += 120.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void apply_fake_duck(usercmd_t* cmd, bool enable_duck) {
|
||||
if (!enable_duck)
|
||||
return;
|
||||
|
||||
static int duck_state = 0;
|
||||
static float next_duck_time = 0.0f;
|
||||
|
||||
if (g_flCurrentTime > next_duck_time) {
|
||||
duck_state = (duck_state + 1) % 4;
|
||||
next_duck_time = g_flCurrentTime + 0.05f;
|
||||
}
|
||||
|
||||
if (duck_state < 2) {
|
||||
cmd->buttons |= IN_DUCK;
|
||||
} else {
|
||||
cmd->buttons &= ~IN_DUCK;
|
||||
}
|
||||
}
|
||||
|
||||
void anti_aim(usercmd_t* cmd) {
|
||||
if (!g_settings.antiaim_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -46,54 +208,116 @@ void anti_aim(usercmd_t* cmd) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((cmd->buttons & IN_ATTACK) && !g_settings.antiaim_on_attack) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd->buttons & IN_USE) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec3_t view_angles;
|
||||
i_engine->GetViewAngles(view_angles);
|
||||
|
||||
static bool lbyBreak = false;
|
||||
if (lbyBreak) {
|
||||
view_angles.y += 120.0f;
|
||||
}
|
||||
lbyBreak = !lbyBreak;
|
||||
if (g_settings.antiaim_pitch_enabled) {
|
||||
if (g_settings.antiaim_pitch_mode == 0) {
|
||||
view_angles.x = g_settings.antiaim_pitch;
|
||||
|
||||
static bool flipPitch = false;
|
||||
if (flipPitch) {
|
||||
view_angles.x = 89.0f;
|
||||
view_angles.x = CLAMP(view_angles.x, -89.0f, 89.0f);
|
||||
} else {
|
||||
view_angles.x = -89.0f;
|
||||
apply_pitch_anti_aim(&view_angles, g_settings.antiaim_pitch_mode, g_settings.antiaim_custom_pitch);
|
||||
}
|
||||
flipPitch = !flipPitch;
|
||||
|
||||
view_angles.y += 30.0f;
|
||||
static float last_debug_time = 0.0f;
|
||||
if (g_flCurrentTime > last_debug_time + 5.0f) {
|
||||
i_engine->Con_Printf("Anti-Aim: Applied pitch angle %.1f (mode %d)\n",
|
||||
view_angles.x, g_settings.antiaim_pitch_mode);
|
||||
last_debug_time = g_flCurrentTime;
|
||||
}
|
||||
}
|
||||
|
||||
bool isBunnyHopping = cmd->buttons & IN_JUMP;
|
||||
bool isStationary = (cmd->forwardmove == 0.0f && cmd->sidemove == 0.0f);
|
||||
|
||||
if (g_settings.fakeduck && (isStationary || isBunnyHopping || isSpacebarPressed())) {
|
||||
static int duckCounter = 0;
|
||||
if (duckCounter < 2) {
|
||||
cmd->buttons |= IN_DUCK;
|
||||
} else if (duckCounter < 4) {
|
||||
cmd->buttons &= ~IN_DUCK;
|
||||
if (g_settings.antiaim_yaw_enabled) {
|
||||
if (g_settings.antiaim_yaw_mode == 0) {
|
||||
if (g_settings.antiaim_legit) {
|
||||
float legit_yaw_max = 35.0f;
|
||||
view_angles.y += CLAMP(g_settings.antiaim_yaw, -legit_yaw_max, legit_yaw_max);
|
||||
} else {
|
||||
duckCounter = 0;
|
||||
view_angles.y += g_settings.antiaim_yaw;
|
||||
}
|
||||
duckCounter++;
|
||||
} else {
|
||||
apply_yaw_anti_aim(&view_angles, g_settings.antiaim_yaw_mode, g_settings.antiaim_custom_yaw,
|
||||
g_settings.antiaim_spin_speed, g_settings.antiaim_jitter_range);
|
||||
}
|
||||
|
||||
if (view_angles.y > 180.0f) view_angles.y -= 360.0f;
|
||||
if (view_angles.y < -180.0f) view_angles.y += 360.0f;
|
||||
}
|
||||
|
||||
apply_lby_breaker(&view_angles, g_settings.antiaim_lby_breaker);
|
||||
|
||||
if (g_settings.antiaim_desync) {
|
||||
static bool switch_side = false;
|
||||
static float next_switch = 0.0f;
|
||||
|
||||
if (g_flCurrentTime > next_switch) {
|
||||
switch_side = !switch_side;
|
||||
next_switch = g_flCurrentTime + random_float(0.4f, 0.8f);
|
||||
}
|
||||
|
||||
if (!g_settings.antiaim_view) {
|
||||
vec3_t real_angles;
|
||||
i_engine->GetViewAngles(real_angles);
|
||||
|
||||
vec3_t server_angles;
|
||||
vec_copy(server_angles, real_angles);
|
||||
server_angles.y += (switch_side ? 58.0f : -58.0f);
|
||||
|
||||
if (server_angles.y > 180.0f) server_angles.y -= 360.0f;
|
||||
if (server_angles.y < -180.0f) server_angles.y += 360.0f;
|
||||
|
||||
vec_copy(cmd->viewangles, server_angles);
|
||||
i_engine->SetViewAngles(real_angles);
|
||||
|
||||
static float last_desync_log = 0.0f;
|
||||
if (g_flCurrentTime > last_desync_log + 3.0f) {
|
||||
i_engine->Con_Printf("Desync active: Server %.1f, Client %.1f (invisible to user)\n",
|
||||
server_angles.y, real_angles.y);
|
||||
last_desync_log = g_flCurrentTime;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
float desync_amount = switch_side ? 58.0f : -58.0f;
|
||||
view_angles.y += desync_amount;
|
||||
|
||||
if (view_angles.y > 180.0f) view_angles.y -= 360.0f;
|
||||
if (view_angles.y < -180.0f) view_angles.y += 360.0f;
|
||||
}
|
||||
|
||||
bool should_fake_duck = false;
|
||||
|
||||
if (g_settings.antiaim_fakeduck_key > 0) {
|
||||
should_fake_duck = g_settings.antiaim_fakeduck && is_key_pressed(g_settings.antiaim_fakeduck_key);
|
||||
} else {
|
||||
should_fake_duck = g_settings.antiaim_fakeduck;
|
||||
}
|
||||
|
||||
if (should_fake_duck) {
|
||||
apply_fake_duck(cmd, true);
|
||||
}
|
||||
|
||||
if (g_settings.antiaim_view) {
|
||||
i_engine->SetViewAngles(view_angles);
|
||||
i_engine->pfnClientCmd("echo \"Set view angles directly using movement_antiaim_view.\"");
|
||||
} else {
|
||||
vec_copy(cmd->viewangles, view_angles);
|
||||
i_engine->pfnClientCmd("echo \"Set view angles silently.\"");
|
||||
}
|
||||
|
||||
static float last_log_time = 0.0f;
|
||||
if (cmd->msec - last_log_time >= 5000.0f) {
|
||||
i_engine->pfnClientCmd("echo \"Advanced Anti-Aim has adjusted view angles.\"");
|
||||
last_log_time = cmd->msec;
|
||||
if (g_flCurrentTime > last_log_time + 5.0f) {
|
||||
i_engine->Con_Printf("Anti-Aim active: Pitch=%.1f, Yaw=%.1f, Mode=%d/%d\n",
|
||||
view_angles.x, view_angles.y,
|
||||
g_settings.antiaim_pitch_mode, g_settings.antiaim_yaw_mode);
|
||||
last_log_time = g_flCurrentTime;
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,9 @@ bool chams(void* this_ptr);
|
||||
/* src/features/aim.c */
|
||||
void aimbot(usercmd_t* cmd);
|
||||
|
||||
/* src/features/no_recoil.c */
|
||||
void no_recoil(usercmd_t* cmd);
|
||||
|
||||
/* src/features/misc.c */
|
||||
void custom_crosshair(void);
|
||||
void bullet_tracers(usercmd_t* cmd);
|
||||
|
||||
@@ -2,23 +2,185 @@
|
||||
#include "../include/settings.h"
|
||||
#include "../include/util.h"
|
||||
#include "../include/globals.h"
|
||||
#include <stdio.h> // For printf
|
||||
#include <time.h> // For time
|
||||
#include "../features/features.h"
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
static time_t last_log_time = 0;
|
||||
static vec3_t last_punch = {0, 0, 0};
|
||||
static vec3_t previous_viewangles = {0, 0, 0};
|
||||
|
||||
#define WEAPON_GLOCK 17
|
||||
#define WEAPON_DEAGLE 26
|
||||
#define WEAPON_AK47 28
|
||||
#define WEAPON_M4A1 22
|
||||
#define WEAPON_AWP 33
|
||||
|
||||
#define AK47_RECOIL_VERT_MULT 2.8f
|
||||
#define AK47_RECOIL_HORIZ_MULT 0.9f
|
||||
#define DEFAULT_RECOIL_VERT_MULT 2.0f
|
||||
#define DEFAULT_RECOIL_HORIZ_MULT 0.6f
|
||||
|
||||
static float ak47_pattern[] = {
|
||||
0.0f,
|
||||
2.2f,
|
||||
3.0f,
|
||||
3.5f,
|
||||
3.9f,
|
||||
4.0f,
|
||||
3.8f,
|
||||
3.5f,
|
||||
3.2f,
|
||||
2.9f,
|
||||
2.7f,
|
||||
2.5f,
|
||||
2.2f,
|
||||
2.0f,
|
||||
1.9f,
|
||||
1.7f,
|
||||
1.6f,
|
||||
1.5f,
|
||||
1.4f,
|
||||
1.3f,
|
||||
1.2f,
|
||||
1.1f,
|
||||
1.0f,
|
||||
0.9f,
|
||||
0.8f,
|
||||
0.8f,
|
||||
0.7f,
|
||||
0.7f,
|
||||
0.6f,
|
||||
0.6f
|
||||
};
|
||||
|
||||
static int bullet_count = 0;
|
||||
static float last_shot_time = 0.0f;
|
||||
static int current_weapon_id = -1;
|
||||
|
||||
void no_recoil(usercmd_t* cmd) {
|
||||
if (!g_settings.aimbot_norecoil || !is_alive(localplayer)) {
|
||||
if (!is_alive(localplayer) || (!g_settings.aimbot_norecoil && !g_settings.aimbot_recoil_comp)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(cmd->buttons & IN_ATTACK)) {
|
||||
if (g_flCurrentTime - last_shot_time > 0.2f) {
|
||||
if (bullet_count > 0) {
|
||||
i_engine->Con_Printf("Recoil: Reset spray pattern from %d bullets\n", bullet_count);
|
||||
bullet_count = 0;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
vec3_t current_viewangles;
|
||||
i_engine->GetViewAngles(current_viewangles);
|
||||
|
||||
bool is_ak47 = false;
|
||||
bool is_high_recoil_weapon = false;
|
||||
|
||||
if (g_currentWeaponID == WEAPON_AK47) {
|
||||
is_ak47 = true;
|
||||
is_high_recoil_weapon = true;
|
||||
}
|
||||
else if (g_currentWeaponID == WEAPON_M4A1) {
|
||||
is_high_recoil_weapon = true;
|
||||
}
|
||||
else if (g_flNextPrimaryAttack - g_flNextAttack < 0.15f) {
|
||||
is_high_recoil_weapon = true;
|
||||
if (g_flNextPrimaryAttack - g_flNextAttack < 0.11f) {
|
||||
is_ak47 = true;
|
||||
}
|
||||
}
|
||||
|
||||
last_shot_time = g_flCurrentTime;
|
||||
|
||||
static float last_attack_time = 0.0f;
|
||||
bool is_new_shot = g_flCurrentTime - last_attack_time > 0.05f;
|
||||
|
||||
if (is_new_shot) {
|
||||
bullet_count++;
|
||||
last_attack_time = g_flCurrentTime;
|
||||
|
||||
if (bullet_count > 1 && (bullet_count % 3 == 0 || bullet_count <= 5)) {
|
||||
i_engine->Con_Printf("Recoil comp: Shot #%d, Weapon: %s\n",
|
||||
bullet_count, is_ak47 ? "AK-47" : (is_high_recoil_weapon ? "High Recoil" : "Standard"));
|
||||
}
|
||||
}
|
||||
|
||||
vec3_t punch_angles;
|
||||
vec_copy(punch_angles, g_punchAngles);
|
||||
|
||||
float vert_mult = 0.0f;
|
||||
float horiz_mult = 0.0f;
|
||||
float pattern_compensation = 0.0f;
|
||||
|
||||
if (g_settings.aimbot_norecoil) {
|
||||
if (is_ak47) {
|
||||
vert_mult = AK47_RECOIL_VERT_MULT;
|
||||
horiz_mult = AK47_RECOIL_HORIZ_MULT;
|
||||
|
||||
if (bullet_count > 0 && bullet_count <= 30) {
|
||||
pattern_compensation = ak47_pattern[bullet_count-1] * 0.6f;
|
||||
}
|
||||
}
|
||||
else if (is_high_recoil_weapon) {
|
||||
vert_mult = 2.2f;
|
||||
horiz_mult = 0.8f;
|
||||
}
|
||||
else {
|
||||
vert_mult = 1.9f;
|
||||
horiz_mult = 0.7f;
|
||||
}
|
||||
|
||||
cmd->viewangles[0] -= (punch_angles[0] * vert_mult);
|
||||
cmd->viewangles[1] -= (punch_angles[1] * horiz_mult);
|
||||
|
||||
if (pattern_compensation > 0) {
|
||||
cmd->viewangles[0] -= pattern_compensation;
|
||||
|
||||
if (is_ak47 && bullet_count <= 5) {
|
||||
i_engine->Con_Printf("AK-47 pattern comp: Shot #%d, Compensation: %.2f degrees\n",
|
||||
bullet_count, pattern_compensation);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (g_settings.aimbot_recoil_comp) {
|
||||
if (is_ak47) {
|
||||
vert_mult = 2.0f;
|
||||
horiz_mult = 0.7f;
|
||||
|
||||
if (bullet_count > 0 && bullet_count <= 30) {
|
||||
pattern_compensation = ak47_pattern[bullet_count-1] * 0.35f;
|
||||
}
|
||||
}
|
||||
else if (is_high_recoil_weapon) {
|
||||
vert_mult = 1.7f;
|
||||
horiz_mult = 0.6f;
|
||||
}
|
||||
else {
|
||||
vert_mult = 1.3f;
|
||||
horiz_mult = 0.5f;
|
||||
}
|
||||
|
||||
cmd->viewangles[0] -= (punch_angles[0] * vert_mult);
|
||||
cmd->viewangles[1] -= (punch_angles[1] * horiz_mult);
|
||||
|
||||
if (pattern_compensation > 0) {
|
||||
cmd->viewangles[0] -= pattern_compensation;
|
||||
}
|
||||
}
|
||||
|
||||
time_t current_time = time(NULL);
|
||||
if (current_time - last_log_time >= 5) {
|
||||
printf("Applying anti-recoil: Punch Angles (X: %f, Y: %f)\n", g_punchAngles[0], g_punchAngles[1]);
|
||||
if (current_time - last_log_time >= 2) {
|
||||
if (bullet_count > 0) {
|
||||
i_engine->Con_Printf("Recoil control - Weapon: %s, Bullet: %d, VMult: %.1f, HMult: %.1f, Pattern: %.1f\n",
|
||||
is_ak47 ? "AK-47" : (is_high_recoil_weapon ? "High Recoil" : "Standard"),
|
||||
bullet_count, vert_mult, horiz_mult, pattern_compensation);
|
||||
}
|
||||
|
||||
last_log_time = current_time;
|
||||
}
|
||||
|
||||
float anti_recoil_value = 100.0f;
|
||||
cmd->viewangles[0] -= (g_punchAngles[0] * anti_recoil_value);
|
||||
cmd->viewangles[1] -= (g_punchAngles[1] * anti_recoil_value);
|
||||
ang_clamp(&cmd->viewangles);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include "../include/sdk.h"
|
||||
|
||||
void aim_no_recoil(usercmd_t* cmd);
|
||||
void no_recoil(usercmd_t* cmd);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
@@ -13,6 +12,7 @@ vec3_t g_punchAngles = { 0, 0, 0 };
|
||||
|
||||
float g_flNextAttack = 0.f, g_flNextPrimaryAttack = 0.f;
|
||||
int g_iClip = 0;
|
||||
int g_currentWeaponID = -1;
|
||||
|
||||
double g_flCurrentTime = 0.0;
|
||||
|
||||
|
||||
10
src/hooks.c
10
src/hooks.c
@@ -215,6 +215,7 @@ void h_CL_CreateMove(float frametime, usercmd_t* cmd, int active) {
|
||||
}
|
||||
|
||||
bhop(cmd);
|
||||
no_recoil(cmd); // Apply recoil control before aimbot
|
||||
aimbot(cmd);
|
||||
bullet_tracers(cmd);
|
||||
anti_aim(cmd);
|
||||
@@ -319,6 +320,15 @@ void h_HUD_PostRunCmd(struct local_state_s* from, struct local_state_s* to,
|
||||
g_flNextPrimaryAttack =
|
||||
to->weapondata[to->client.m_iId].m_flNextPrimaryAttack;
|
||||
g_iClip = to->weapondata[to->client.m_iId].m_iClip;
|
||||
|
||||
// Track current weapon ID
|
||||
int weaponId = to->client.m_iId;
|
||||
|
||||
// Update global weapon ID if it changed
|
||||
if (g_currentWeaponID != weaponId) {
|
||||
g_currentWeaponID = weaponId;
|
||||
i_engine->Con_Printf("Weapon changed: ID=%d\n", g_currentWeaponID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#ifndef GLOBALS_H_
|
||||
#define GLOBALS_H_
|
||||
|
||||
@@ -39,6 +38,7 @@ extern vec3_t g_punchAngles;
|
||||
extern float g_flNextAttack, g_flNextPrimaryAttack;
|
||||
extern float* scr_fov_value;
|
||||
extern int g_iClip;
|
||||
extern int g_currentWeaponID;
|
||||
extern double g_flCurrentTime;
|
||||
|
||||
extern void* hw;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
#ifndef MATHUTIL_H_
|
||||
#define MATHUTIL_H_ 1
|
||||
|
||||
#include "sdk.h"
|
||||
#include "util.h"
|
||||
|
||||
/* Vector 2 for 2d points */
|
||||
typedef float vec2_t[2];
|
||||
@@ -11,8 +11,6 @@ typedef float vec2_t[2];
|
||||
|
||||
#define DEG2RAD(n) ((n)*M_PI / 180.0f)
|
||||
#define RAD2DEG(n) ((n)*180.0f / M_PI)
|
||||
#define CLAMP(val, min, max) \
|
||||
(((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))
|
||||
|
||||
/* Use indexes so it works for float[] as well as vec3_t */
|
||||
#define vec_copy(dst, src) \
|
||||
|
||||
@@ -27,12 +27,13 @@ typedef struct {
|
||||
bool aimbot_enabled;
|
||||
float aimbot_fov;
|
||||
float aimbot_smooth;
|
||||
bool aimbot_smoothing_enabled;
|
||||
bool aimbot_silent;
|
||||
bool aimbot_autoshoot;
|
||||
bool aimbot_require_key;
|
||||
bool aimbot_norecoil;
|
||||
bool aimbot_recoil_comp;
|
||||
bool aimbot_friendly_fire;
|
||||
bool aimbot_rage_mode;
|
||||
bool aimbot_team_attack;
|
||||
int aimbot_hitbox;
|
||||
|
||||
@@ -43,6 +44,37 @@ typedef struct {
|
||||
bool fakeduck;
|
||||
bool clmove;
|
||||
|
||||
int aa_pitch_mode;
|
||||
int aa_yaw_mode;
|
||||
float aa_custom_pitch;
|
||||
float aa_custom_yaw;
|
||||
float aa_spin_speed;
|
||||
float aa_jitter_range;
|
||||
bool aa_lby_breaker;
|
||||
bool aa_desync;
|
||||
bool aa_on_attack;
|
||||
bool aa_first_person;
|
||||
bool fake_duck;
|
||||
|
||||
bool antiaim_enabled;
|
||||
bool antiaim_pitch_enabled;
|
||||
bool antiaim_yaw_enabled;
|
||||
float antiaim_pitch;
|
||||
float antiaim_yaw;
|
||||
bool antiaim_fakeduck;
|
||||
int antiaim_fakeduck_key;
|
||||
bool antiaim_desync;
|
||||
bool antiaim_legit;
|
||||
|
||||
int antiaim_pitch_mode;
|
||||
int antiaim_yaw_mode;
|
||||
float antiaim_custom_pitch;
|
||||
float antiaim_custom_yaw;
|
||||
float antiaim_spin_speed;
|
||||
float antiaim_jitter_range;
|
||||
bool antiaim_lby_breaker;
|
||||
bool antiaim_on_attack;
|
||||
|
||||
bool namechanger;
|
||||
float namechanger_speed;
|
||||
bool menu_allow_movement;
|
||||
@@ -50,6 +82,8 @@ typedef struct {
|
||||
bool thirdperson;
|
||||
int thirdperson_key;
|
||||
float thirdperson_dist;
|
||||
|
||||
bool blinker;
|
||||
} cheat_settings_t;
|
||||
|
||||
extern cheat_settings_t g_settings;
|
||||
@@ -67,6 +101,7 @@ inline void init_default_settings(void) {
|
||||
|
||||
g_settings.aimbot_fov = 5.0f;
|
||||
g_settings.aimbot_smooth = 10.0f;
|
||||
g_settings.aimbot_smoothing_enabled = true;
|
||||
g_settings.aimbot_hitbox = 0;
|
||||
|
||||
g_settings.esp_mode = ESP_OFF;
|
||||
@@ -78,7 +113,43 @@ inline void init_default_settings(void) {
|
||||
g_settings.thirdperson_dist = 300.0f;
|
||||
g_settings.thirdperson_key = 'C';
|
||||
|
||||
// Initialize anti-aim defaults
|
||||
g_settings.aa_pitch_mode = 0; // None
|
||||
g_settings.aa_yaw_mode = 0; // None
|
||||
g_settings.aa_custom_pitch = 0.0f;
|
||||
g_settings.aa_custom_yaw = 0.0f;
|
||||
g_settings.aa_spin_speed = 360.0f; // One rotation per second
|
||||
g_settings.aa_jitter_range = 45.0f; // ±45 degrees jitter
|
||||
g_settings.aa_lby_breaker = false;
|
||||
g_settings.aa_desync = false;
|
||||
g_settings.aa_on_attack = false;
|
||||
g_settings.aa_first_person = false;
|
||||
g_settings.fake_duck = false;
|
||||
|
||||
// Initialize new anti-aim settings
|
||||
g_settings.antiaim_enabled = false;
|
||||
g_settings.antiaim_pitch_enabled = false;
|
||||
g_settings.antiaim_yaw_enabled = false;
|
||||
g_settings.antiaim_pitch = 89.0f; // Default to look down
|
||||
g_settings.antiaim_yaw = 180.0f; // Default to backward
|
||||
g_settings.antiaim_fakeduck = false;
|
||||
g_settings.antiaim_fakeduck_key = 0; // No key binding
|
||||
g_settings.antiaim_desync = false;
|
||||
g_settings.antiaim_legit = false;
|
||||
g_settings.antiaim_view = false; // Don't show anti-aim in first person by default
|
||||
|
||||
// Initialize advanced anti-aim settings
|
||||
g_settings.antiaim_pitch_mode = 1; // Down (89°)
|
||||
g_settings.antiaim_yaw_mode = 1; // Backward (180°)
|
||||
g_settings.antiaim_custom_pitch = 0.0f;
|
||||
g_settings.antiaim_custom_yaw = 0.0f;
|
||||
g_settings.antiaim_spin_speed = 360.0f; // One rotation per second
|
||||
g_settings.antiaim_jitter_range = 45.0f; // ±45 degrees jitter
|
||||
g_settings.antiaim_lby_breaker = false;
|
||||
g_settings.antiaim_on_attack = false;
|
||||
|
||||
g_settings.menu_allow_movement = true;
|
||||
g_settings.blinker = false;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -23,8 +23,8 @@ typedef struct {
|
||||
|
||||
#define DEG2RAD(n) ((n)*M_PI / 180.0f)
|
||||
#define RAD2DEG(n) ((n)*180.0f / M_PI)
|
||||
#define CLAMP(val, min, max) \
|
||||
(((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))
|
||||
|
||||
#define CLAMP(x, min, max) ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))
|
||||
|
||||
#define gl_drawline_points(p0, p1, w, col) \
|
||||
gl_drawline(p0[0], p0[1], p1[0], p1[1], w, col);
|
||||
|
||||
353
src/menu.c
353
src/menu.c
@@ -9,6 +9,7 @@
|
||||
#include "include/globals.h"
|
||||
#include "include/settings.h"
|
||||
#include "include/hooks.h"
|
||||
#include "include/util.h"
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "include/sdk/public/keydefs.h"
|
||||
@@ -183,14 +184,28 @@ extern "C" void menu_render(void) {
|
||||
if (ImGui::BeginTabBar("##Tabs", ImGuiTabBarFlags_None)) {
|
||||
|
||||
if (ImGui::BeginTabItem("Aimbot")) {
|
||||
// Main aimbot settings section
|
||||
ImGui::Text("Aimbot Settings");
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Enable Aimbot", &g_settings.aimbot_enabled)) {
|
||||
}
|
||||
|
||||
if (g_settings.aimbot_enabled) {
|
||||
// Target selection section
|
||||
ImGui::Text("Target Selection:");
|
||||
|
||||
if (ImGui::SliderFloat("FOV", &g_settings.aimbot_fov, 0.1f, 180.0f, "%.1f")) {
|
||||
// Ensure value stays within limits
|
||||
g_settings.aimbot_fov = CLAMP(g_settings.aimbot_fov, 0.1f, 180.0f);
|
||||
}
|
||||
|
||||
if (ImGui::SliderFloat("Smoothing", &g_settings.aimbot_smooth, 1.0f, 100.0f, "%.1f")) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Field of view for target selection.\nSmaller values = more precise targeting");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
const char* hitbox_items[] = { "Head", "Chest", "Stomach", "Pelvis", "Nearest" };
|
||||
@@ -198,12 +213,94 @@ extern "C" void menu_render(void) {
|
||||
current_hitbox = g_settings.aimbot_hitbox;
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Auto Shoot", &g_settings.aimbot_autoshoot);
|
||||
ImGui::Checkbox("Silent Aim", &g_settings.aimbot_silent);
|
||||
ImGui::Checkbox("No Recoil", &g_settings.aimbot_norecoil);
|
||||
ImGui::Checkbox("Recoil Compensation", &g_settings.aimbot_recoil_comp);
|
||||
ImGui::Checkbox("Shoot Teammates", &g_settings.aimbot_team_attack);
|
||||
ImGui::Checkbox("Rage Mode", &g_settings.aimbot_rage_mode);
|
||||
|
||||
// Aiming behavior section
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Aiming Behavior:");
|
||||
|
||||
ImGui::Checkbox("Enable Smoothing", &g_settings.aimbot_smoothing_enabled);
|
||||
|
||||
if (g_settings.aimbot_smoothing_enabled) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Makes aim movement look more natural");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (ImGui::SliderFloat("Smoothing", &g_settings.aimbot_smooth, 1.0f, 100.0f, "%.1f")) {
|
||||
// Ensure value stays within limits
|
||||
g_settings.aimbot_smooth = CLAMP(g_settings.aimbot_smooth, 1.0f, 100.0f);
|
||||
}
|
||||
|
||||
ImGui::Text("Lower = Faster | Higher = Smoother");
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Silent Aim", &g_settings.aimbot_silent);
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Aim is only visible server-side, not in your view");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
// Recoil control section
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Recoil Control:");
|
||||
|
||||
ImGui::Checkbox("No Recoil", &g_settings.aimbot_norecoil);
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Completely removes recoil effect");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Recoil Compensation", &g_settings.aimbot_recoil_comp);
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Dynamic recoil correction for weapons like AK-47\nAdjusts aim based on spray pattern");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
// Auto shoot section
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Auto Functions:");
|
||||
|
||||
ImGui::Checkbox("Auto Shoot", &g_settings.aimbot_autoshoot);
|
||||
|
||||
if (g_settings.aimbot_autoshoot) {
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Auto Shoot automatically fires when aim is on target");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Indent(20);
|
||||
ImGui::Checkbox("Require Fire Button", &g_settings.aimbot_require_key);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("When enabled, auto-shoot will only fire if you're also pressing the fire button");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
ImGui::Unindent(20);
|
||||
}
|
||||
|
||||
// Weapon info section
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Current Weapon: %s (ID: %d)",
|
||||
g_currentWeaponID == 7 ? "AK-47" :
|
||||
g_currentWeaponID == 16 ? "M4A1" :
|
||||
g_currentWeaponID == 1 ? "Desert Eagle" : "Unknown",
|
||||
g_currentWeaponID);
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
@@ -248,6 +345,233 @@ extern "C" void menu_render(void) {
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui::BeginTabItem("Anti-Aim")) {
|
||||
ImGui::Text("Anti-Aim Settings");
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Enable Anti-Aim", &g_settings.antiaim_enabled)) {
|
||||
if (g_settings.antiaim_enabled) {
|
||||
i_engine->Con_Printf("Anti-Aim enabled\n");
|
||||
} else {
|
||||
i_engine->Con_Printf("Anti-Aim disabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Master switch for all anti-aim features");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (g_settings.antiaim_enabled) {
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Pitch Control:");
|
||||
|
||||
if (ImGui::Checkbox("Enable Pitch Anti-Aim", &g_settings.antiaim_pitch_enabled)) {
|
||||
if (g_settings.antiaim_pitch_enabled) {
|
||||
i_engine->Con_Printf("Pitch Anti-Aim enabled\n");
|
||||
} else {
|
||||
i_engine->Con_Printf("Pitch Anti-Aim disabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (g_settings.antiaim_pitch_enabled) {
|
||||
const char* pitch_items[] = {"Fixed", "Down (89°)", "Up (-89°)", "Zero (0°)", "Jitter", "Custom"};
|
||||
if (ImGui::Combo("Pitch Mode", &g_settings.antiaim_pitch_mode, pitch_items, 6)) {
|
||||
// Reset custom pitch if mode changed
|
||||
if (g_settings.antiaim_pitch_mode != 5) { // Not custom
|
||||
g_settings.antiaim_custom_pitch = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Show settings based on mode
|
||||
if (g_settings.antiaim_pitch_mode == 0) { // Fixed
|
||||
ImGui::SliderFloat("Pitch Angle", &g_settings.antiaim_pitch, -89.0f, 89.0f, "%.1f°");
|
||||
}
|
||||
else if (g_settings.antiaim_pitch_mode == 5) { // Custom
|
||||
ImGui::SliderFloat("Custom Pitch", &g_settings.antiaim_custom_pitch, -89.0f, 89.0f, "%.1f°");
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Yaw Control:");
|
||||
|
||||
if (ImGui::Checkbox("Enable Yaw Anti-Aim", &g_settings.antiaim_yaw_enabled)) {
|
||||
if (g_settings.antiaim_yaw_enabled) {
|
||||
i_engine->Con_Printf("Yaw Anti-Aim enabled\n");
|
||||
} else {
|
||||
i_engine->Con_Printf("Yaw Anti-Aim disabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (g_settings.antiaim_yaw_enabled) {
|
||||
const char* yaw_items[] = {"Fixed", "Backward (180°)", "Spin", "Jitter", "Sideways", "Custom"};
|
||||
if (ImGui::Combo("Yaw Mode", &g_settings.antiaim_yaw_mode, yaw_items, 6)) {
|
||||
// Reset custom yaw if mode changed
|
||||
if (g_settings.antiaim_yaw_mode != 5) { // Not custom
|
||||
g_settings.antiaim_custom_yaw = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Show settings based on mode
|
||||
if (g_settings.antiaim_yaw_mode == 0) { // Fixed
|
||||
ImGui::SliderFloat("Yaw Angle", &g_settings.antiaim_yaw, -180.0f, 180.0f, "%.1f°");
|
||||
}
|
||||
else if (g_settings.antiaim_yaw_mode == 2) { // Spin
|
||||
ImGui::SliderFloat("Spin Speed", &g_settings.antiaim_spin_speed, 10.0f, 1000.0f, "%.1f°/s");
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Controls how fast the spin rotates (degrees per second)");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
else if (g_settings.antiaim_yaw_mode == 3) { // Jitter
|
||||
ImGui::SliderFloat("Jitter Range", &g_settings.antiaim_jitter_range, 5.0f, 180.0f, "%.1f°");
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Controls the maximum angle of random jitter (±degrees)");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
}
|
||||
else if (g_settings.antiaim_yaw_mode == 5) { // Custom
|
||||
ImGui::SliderFloat("Custom Yaw", &g_settings.antiaim_custom_yaw, -180.0f, 180.0f, "%.1f°");
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Additional Options:");
|
||||
|
||||
ImGui::Checkbox("Anti-Aim When Shooting", &g_settings.antiaim_on_attack);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Continue anti-aim even when attacking (may affect accuracy)");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("LBY Breaker", &g_settings.antiaim_lby_breaker);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Breaks lower body yaw for more effective anti-aim");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Desync", &g_settings.antiaim_desync);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Creates a desync between client and server angles.\nMakes you harder to hit but may cause visual glitches.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Legit Anti-Aim", &g_settings.antiaim_legit);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Less obvious anti-aim that's harder to detect visually.\nLess effective than rage anti-aim but less noticeable.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Show in First Person", &g_settings.antiaim_view);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("When enabled, you'll see your anti-aim from first person.\nWhen disabled, only others see your anti-aim.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Fake Duck", &g_settings.antiaim_fakeduck);
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Rapidly switches between duck and stand positions.\nMakes you harder to hit while appearing ducked to others.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (g_settings.antiaim_fakeduck) {
|
||||
const char* key_name = "None";
|
||||
if (g_settings.antiaim_fakeduck_key > 0) {
|
||||
// Convert key code to name
|
||||
switch(g_settings.antiaim_fakeduck_key) {
|
||||
case 'F': key_name = "F"; break;
|
||||
case 'V': key_name = "V"; break;
|
||||
case 'T': key_name = "T"; break;
|
||||
case 'P': key_name = "P"; break;
|
||||
case 'C': key_name = "C"; break;
|
||||
case K_F1: key_name = "F1"; break;
|
||||
case K_F2: key_name = "F2"; break;
|
||||
case K_F3: key_name = "F3"; break;
|
||||
case K_F4: key_name = "F4"; break;
|
||||
case K_F5: key_name = "F5"; break;
|
||||
case K_TAB: key_name = "Tab"; break;
|
||||
case K_SPACE: key_name = "Space"; break;
|
||||
case K_CTRL: key_name = "Ctrl"; break;
|
||||
case K_SHIFT: key_name = "Shift"; break;
|
||||
case K_ALT: key_name = "Alt"; break;
|
||||
case K_MOUSE1: key_name = "Mouse1"; break;
|
||||
case K_MOUSE2: key_name = "Mouse2"; break;
|
||||
case K_MOUSE3: key_name = "Mouse3"; break;
|
||||
default: {
|
||||
if (g_settings.antiaim_fakeduck_key >= 32 && g_settings.antiaim_fakeduck_key <= 126) {
|
||||
static char chr[2] = {0};
|
||||
chr[0] = (char)g_settings.antiaim_fakeduck_key;
|
||||
key_name = chr;
|
||||
} else {
|
||||
static char code[32] = {0};
|
||||
snprintf(code, sizeof(code), "Key %d", g_settings.antiaim_fakeduck_key);
|
||||
key_name = code;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Text("Fake Duck Key: %s", key_name);
|
||||
|
||||
if (g_waiting_for_key_bind && g_current_key_binding_action && strcmp(g_current_key_binding_action, "fakeduck") == 0) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8f, 0.1f, 0.1f, 1.0f));
|
||||
ImGui::Button("Press any key...", ImVec2(150, 25));
|
||||
ImGui::PopStyleColor();
|
||||
} else {
|
||||
if (ImGui::Button("Bind Fake Duck Key", ImVec2(150, 25))) {
|
||||
g_waiting_for_key_bind = true;
|
||||
g_current_key_binding_action = "fakeduck";
|
||||
i_engine->Con_Printf("Press any key to bind for fake duck\n");
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Clear##FakeDuckKey", ImVec2(80, 25))) {
|
||||
g_settings.antiaim_fakeduck_key = 0;
|
||||
i_engine->Con_Printf("Fake duck key binding cleared\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
if (ImGui::BeginTabItem("Misc")) {
|
||||
ImGui::Checkbox("Name Changer", &g_settings.namechanger);
|
||||
|
||||
@@ -268,6 +592,21 @@ extern "C" void menu_render(void) {
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Reset Settings", ImVec2(150, 30))) {
|
||||
settings_reset();
|
||||
i_engine->pfnClientCmd("echo \"All settings have been reset to defaults.\"");
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.1f, 1.0f), "?");
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Reset all settings to default values");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Uninject Cheat", ImVec2(150, 30))) {
|
||||
i_engine->pfnClientCmd("dz_uninject");
|
||||
g_menu_open = false;
|
||||
@@ -510,10 +849,12 @@ static void render_fallback_menu(void) {
|
||||
i_engine->pfnDrawConsoleString(x1+30, y, buffer);
|
||||
y += 15;
|
||||
|
||||
if (g_settings.aimbot_smoothing_enabled) {
|
||||
snprintf(buffer, sizeof(buffer), "- Smoothing: %.1f", g_settings.aimbot_smooth);
|
||||
i_engine->pfnDrawConsoleString(x1+30, y, buffer);
|
||||
y += 15;
|
||||
}
|
||||
}
|
||||
|
||||
y += 10;
|
||||
i_engine->pfnDrawSetTextColor(0.0f, 1.0f, 1.0f);
|
||||
|
||||
@@ -46,6 +46,7 @@ bool create_root_default_config(void) {
|
||||
preset.chams = true;
|
||||
preset.aimbot_enabled = true;
|
||||
preset.aimbot_fov = 5.0f;
|
||||
preset.aimbot_smoothing_enabled = true;
|
||||
preset.bhop = true;
|
||||
preset.autostrafe = true;
|
||||
preset.thirdperson = false;
|
||||
@@ -150,8 +151,9 @@ void settings_reset(void) {
|
||||
g_settings.aimbot_norecoil = false;
|
||||
g_settings.aimbot_recoil_comp = false;
|
||||
g_settings.aimbot_friendly_fire = false;
|
||||
g_settings.aimbot_rage_mode = false;
|
||||
g_settings.aimbot_team_attack = false;
|
||||
g_settings.aimbot_require_key = false;
|
||||
g_settings.aimbot_smoothing_enabled = true;
|
||||
|
||||
g_settings.bhop = false;
|
||||
g_settings.autostrafe = false;
|
||||
@@ -160,6 +162,27 @@ void settings_reset(void) {
|
||||
g_settings.fakeduck = false;
|
||||
g_settings.clmove = false;
|
||||
|
||||
// Reset anti-aim settings
|
||||
g_settings.antiaim_enabled = false;
|
||||
g_settings.antiaim_pitch_enabled = false;
|
||||
g_settings.antiaim_yaw_enabled = false;
|
||||
g_settings.antiaim_pitch = 89.0f;
|
||||
g_settings.antiaim_yaw = 180.0f;
|
||||
g_settings.antiaim_fakeduck = false;
|
||||
g_settings.antiaim_fakeduck_key = 0;
|
||||
g_settings.antiaim_desync = false;
|
||||
g_settings.antiaim_legit = false;
|
||||
|
||||
// Reset advanced anti-aim settings
|
||||
g_settings.antiaim_pitch_mode = 1; // Down (89°)
|
||||
g_settings.antiaim_yaw_mode = 1; // Backward (180°)
|
||||
g_settings.antiaim_custom_pitch = 0.0f;
|
||||
g_settings.antiaim_custom_yaw = 0.0f;
|
||||
g_settings.antiaim_spin_speed = 360.0f; // One rotation per second
|
||||
g_settings.antiaim_jitter_range = 45.0f; // ±45 degrees jitter
|
||||
g_settings.antiaim_lby_breaker = false;
|
||||
g_settings.antiaim_on_attack = false;
|
||||
|
||||
g_settings.namechanger = false;
|
||||
|
||||
g_settings.fov = 90.0f;
|
||||
|
||||
Reference in New Issue
Block a user