diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd39d83d..cbb65984 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,7 @@ set(EnableProfiler 0 CACHE BOOL "Enable Profiler")
set(EnableGUI 1 CACHE BOOL "Enable GUI")
set(EnableIPC 1 CACHE BOOL "Enable IPC")
set(DataPath "/opt/cathook/data" CACHE FILEPATH "Data location")
-set(VACBypass 0 CACHE BOOL "Textmode VAC bypass")
+set(VACBypass 1 CACHE BOOL "Textmode VAC bypass")
set(EnableTextmodeStdin 0 CACHE BOOL "Textmode Stdin -> Console bridge (EXPERIMENTAL)")
set(EnableWarnings 0 CACHE BOOL "Enable compile warnings")
set(EnableNullNexus 1 CACHE BOOL "Enable NullNexus chat and other features")
diff --git a/TODO b/TODO
index 507d0ba7..f30165d1 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,15 @@
update CGameRules and fix navbot
-fix bot fail during path after respawn in navparser
-
fix crashes (i hope BenCat07 will fix it)
fix EventLogging (crash)
fix skyboxchanger (not working and crash)
-add zoom and rev distance to cathook (optional)
+add rev distance to cathook (optional)
-fix hitbox update in ESP (crash) i had delete it
\ No newline at end of file
+fix hitboxupdate in ESP (crash) i had delete it
+
+need regenerate nav files
+
+update ClassIDs
\ No newline at end of file
diff --git a/data/menu/nullifiedcat/weapons/aimbot.xml b/data/menu/nullifiedcat/weapons/aimbot.xml
index 58bc6a64..32d224e3 100755
--- a/data/menu/nullifiedcat/weapons/aimbot.xml
+++ b/data/menu/nullifiedcat/weapons/aimbot.xml
@@ -104,7 +104,7 @@
-
+
@@ -112,6 +112,7 @@
+
diff --git a/include/hacks/NavBot.hpp b/include/hacks/NavBot.hpp
index 81a369ec..af03d41d 100644
--- a/include/hacks/NavBot.hpp
+++ b/include/hacks/NavBot.hpp
@@ -1,10 +1,11 @@
-/*#pragma once
+#pragma once
-#include
-#include
+// #include
+// #include
namespace hacks::tf2::NavBot
{
+/*
bool init(bool first_cm);
namespace task
{
@@ -69,6 +70,6 @@ struct bot_class_config
float min;
float preferred;
float max;
-};
+};*/
+std::pair getNearestPlayerDistance();
} // namespace hacks::tf2::NavBot
-*/
\ No newline at end of file
diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp
index f4fa9456..3d88a667 100644
--- a/src/hacks/Aimbot.cpp
+++ b/src/hacks/Aimbot.cpp
@@ -19,6 +19,7 @@
#include "FollowBot.hpp"
#include "Warp.hpp"
#include "AntiCheatBypass.hpp"
+#include "NavBot.hpp"
namespace hacks::shared::aimbot
{
static settings::Boolean normal_enable{ "aimbot.enable", "false" };
@@ -60,6 +61,7 @@ static settings::Boolean auto_spin_up{ "aimbot.auto.spin-up", "0" };
static settings::Boolean minigun_tapfire{ "aimbot.auto.tapfire", "false" };
static settings::Boolean auto_zoom{ "aimbot.auto.zoom", "0" };
static settings::Boolean auto_unzoom{ "aimbot.auto.unzoom", "0" };
+static settings::Int zoom_distance{ "aimbot.zoom.distance", "1250" }; // that's default zoom distance
static settings::Boolean backtrackAimbot{ "aimbot.backtrack", "0" };
static settings::Boolean backtrackLastTickOnly("aimbot.backtrack.only-last-tick", "true");
@@ -429,6 +431,7 @@ bool validateTickFOV(tf2::backtrack::BacktrackData &tick)
void doAutoZoom(bool target_found)
{
bool isIdle = target_found ? false : hacks::shared::followbot::isIdle();
+ auto nearest = hacks::tf2::NavBot::getNearestPlayerDistance();
// Keep track of our zoom time
static Timer zoomTime{};
@@ -443,14 +446,14 @@ void doAutoZoom(bool target_found)
return;
}
- if (auto_zoom && g_pLocalPlayer->holding_sniper_rifle && (target_found || isIdle))
+ if (auto_zoom && g_pLocalPlayer->holding_sniper_rifle && (target_found || isIdle || nearest.second < *zoom_distance))
{
if (target_found)
zoomTime.update();
if (not g_pLocalPlayer->bZoomed)
current_user_cmd->buttons |= IN_ATTACK2;
}
- else if (!target_found)
+ else if (!target_found && nearest.second >= *zoom_distance)
{
// Auto-Unzoom
if (auto_unzoom)
diff --git a/src/hacks/NavBot.cpp b/src/hacks/NavBot.cpp
index 564b7353..32ed3f73 100644
--- a/src/hacks/NavBot.cpp
+++ b/src/hacks/NavBot.cpp
@@ -255,7 +255,7 @@ void refreshSniperSpots()
sniper_spots.emplace_back(hiding_spot.m_pos);
}
-static std::pair getNearestPlayerDistance()
+std::pair getNearestPlayerDistance()
{
float distance = FLT_MAX;
CachedEntity *best_ent = nullptr;