Fire button
This commit is contained in:
parent
1d94704814
commit
cbea54c5ce
src
@ -267,6 +267,7 @@ void aimbot(usercmd_t* cmd) {
|
|||||||
|
|
||||||
bool should_run_aimbot = true;
|
bool should_run_aimbot = true;
|
||||||
bool should_autoshoot = g_settings.aimbot_autoshoot;
|
bool should_autoshoot = g_settings.aimbot_autoshoot;
|
||||||
|
bool fire_button_pressed = (cmd->buttons & IN_ATTACK) != 0;
|
||||||
|
|
||||||
switch (0) {
|
switch (0) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -341,12 +342,14 @@ void aimbot(usercmd_t* cmd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (should_autoshoot && can_fire) {
|
if (should_autoshoot && can_fire) {
|
||||||
if (g_settings.aimbot_rage_mode) {
|
if (!g_settings.aimbot_require_key || fire_button_pressed) {
|
||||||
cmd->buttons |= IN_ATTACK;
|
if (g_settings.aimbot_rage_mode) {
|
||||||
} else {
|
|
||||||
float aim_error = sqrtf(delta.x * delta.x + delta.y * delta.y);
|
|
||||||
if (aim_error < 5.0f) {
|
|
||||||
cmd->buttons |= IN_ATTACK;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ typedef struct {
|
|||||||
float aimbot_smooth;
|
float aimbot_smooth;
|
||||||
bool aimbot_silent;
|
bool aimbot_silent;
|
||||||
bool aimbot_autoshoot;
|
bool aimbot_autoshoot;
|
||||||
|
bool aimbot_require_key;
|
||||||
bool aimbot_norecoil;
|
bool aimbot_norecoil;
|
||||||
bool aimbot_recoil_comp;
|
bool aimbot_recoil_comp;
|
||||||
bool aimbot_friendly_fire;
|
bool aimbot_friendly_fire;
|
||||||
|
20
src/menu.c
20
src/menu.c
@ -199,6 +199,26 @@ extern "C" void menu_render(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Checkbox("Auto Shoot", &g_settings.aimbot_autoshoot);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Checkbox("Silent Aim", &g_settings.aimbot_silent);
|
ImGui::Checkbox("Silent Aim", &g_settings.aimbot_silent);
|
||||||
ImGui::Checkbox("No Recoil", &g_settings.aimbot_norecoil);
|
ImGui::Checkbox("No Recoil", &g_settings.aimbot_norecoil);
|
||||||
ImGui::Checkbox("Recoil Compensation", &g_settings.aimbot_recoil_comp);
|
ImGui::Checkbox("Recoil Compensation", &g_settings.aimbot_recoil_comp);
|
||||||
|
@ -152,6 +152,7 @@ void settings_reset(void) {
|
|||||||
g_settings.aimbot_friendly_fire = false;
|
g_settings.aimbot_friendly_fire = false;
|
||||||
g_settings.aimbot_rage_mode = false;
|
g_settings.aimbot_rage_mode = false;
|
||||||
g_settings.aimbot_team_attack = false;
|
g_settings.aimbot_team_attack = false;
|
||||||
|
g_settings.aimbot_require_key = false;
|
||||||
|
|
||||||
g_settings.bhop = false;
|
g_settings.bhop = false;
|
||||||
g_settings.autostrafe = false;
|
g_settings.autostrafe = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user