Add VACNet safe mode + fix null guards and FOV overlay

- SafeMode disables ragebot, triggerbot, anti-aim, movement hacks, noflash, FOV changer and all visuals (ESP/glow/chams) at runtime and in hooks
This commit is contained in:
2026-08-05 18:44:16 +02:00
parent 75670df148
commit 06c3ad81e5
6 changed files with 195 additions and 82 deletions
@@ -9,6 +9,7 @@
#include <AndromedaClient/CAndromedaGUI.hpp>
#include <AndromedaClient/Fonts/CFontManager.hpp>
#include <AndromedaClient/Render/CRenderStackSystem.hpp>
#include <AndromedaClient/Settings/Settings.hpp>
#include <AndromedaClient/Features/CVisual/CVisual.hpp>
#include <AndromedaClient/Features/CChams/CChams.hpp>
#include <AndromedaClient/Features/CInventoryChanger/CInventoryChanger.hpp>
@@ -63,14 +64,18 @@ auto CAndromedaClient::OnClientOutput() -> void
{
if ( SDK::Interfaces::EngineToClient()->IsInGame() )
{
if ( !Settings::SafeMode::Active )
GetVisual()->OnClientOutput();
GetMisc()->OnClientOutput();
}
}
auto CAndromedaClient::OnCreateMove( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
{
if ( !Settings::SafeMode::Active )
GetVisual()->OnCreateMove();
GetMisc()->OnCreateMove( pInput , pUserCmd );
}
@@ -371,6 +371,14 @@ auto CMisc::OnClientOutput() -> void
if ( !SDK::Interfaces::EngineToClient()->IsInGame() )
return;
if ( Settings::SafeMode::Active && Settings::SafeMode::DrawIndicator )
{
auto* pSafeFont = &GetFontManager()->m_VerdanaFont;
if ( pSafeFont )
GetRenderStackSystem()->DrawString( pSafeFont , ImVec2( 8.f , 8.f ) , FW1_LEFT | FW1_TOP , ImColor( 0 , 255 , 0 ) , "[SAFE MODE]" );
}
if ( Settings::Misc::SpectatorList )
{
auto* pLocalController = GetCL_Players()->GetLocalPlayerController();
@@ -435,7 +443,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::Triggerbot::Active && Settings::Triggerbot::DrawIndicator )
if ( !Settings::SafeMode::Active && Settings::Triggerbot::Active && Settings::Triggerbot::DrawIndicator )
{
if ( m_bTargetInCrosshair )
{
@@ -449,7 +457,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::Ragebot::Active && Settings::Ragebot::DrawFov )
if ( !Settings::SafeMode::Active && Settings::Ragebot::Active && Settings::Ragebot::DrawFov )
{
const auto DisplaySize = ImGui::GetIO().DisplaySize;
@@ -457,7 +465,9 @@ auto CMisc::OnClientOutput() -> void
constexpr float k_Pi = 3.14159265358979f;
const float flRadius = std::tanf( Settings::Ragebot::FOV * ( k_Pi / 180.f ) ) * ( DisplaySize.y * 0.6f );
const float flFovDeg = std::clamp( static_cast<float>( Settings::Ragebot::FOV ) , 1.f , 89.f );
const float flRadius = std::tanf( flFovDeg * 0.5f * ( k_Pi / 180.f ) ) * ( DisplaySize.y * 0.6f );
constexpr int k_Segments = 48;
@@ -473,7 +483,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::Ragebot::Active && Settings::Ragebot::DrawTarget )
if ( !Settings::SafeMode::Active && Settings::Ragebot::Active && Settings::Ragebot::DrawTarget )
{
if ( m_bRagebotTargetValid )
{
@@ -495,7 +505,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::Legitbot::Active && Settings::Legitbot::DrawFov )
if ( !Settings::SafeMode::Active && Settings::Legitbot::Active && Settings::Legitbot::DrawFov )
{
const auto DisplaySize = ImGui::GetIO().DisplaySize;
@@ -503,7 +513,9 @@ auto CMisc::OnClientOutput() -> void
constexpr float k_Pi = 3.14159265358979f;
const float flRadius = std::tanf( Settings::Legitbot::FOV * ( k_Pi / 180.f ) ) * ( DisplaySize.y * 0.6f );
const float flFovDeg = std::clamp( static_cast<float>( Settings::Legitbot::FOV ) , 1.f , 89.f );
const float flRadius = std::tanf( flFovDeg * 0.5f * ( k_Pi / 180.f ) ) * ( DisplaySize.y * 0.6f );
constexpr int k_Segments = 48;
@@ -519,7 +531,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::Legitbot::Active && Settings::Legitbot::DrawTarget )
if ( !Settings::SafeMode::Active && Settings::Legitbot::Active && Settings::Legitbot::DrawTarget )
{
if ( m_bLegitTargetValid )
{
@@ -541,7 +553,7 @@ auto CMisc::OnClientOutput() -> void
}
}
if ( Settings::AntiAim::Active && Settings::AntiAim::DrawIndicator && m_bAntiAimActive )
if ( !Settings::SafeMode::Active && Settings::AntiAim::Active && Settings::AntiAim::DrawIndicator && m_bAntiAimActive )
{
auto* pFont = &GetFontManager()->m_VerdanaFont;
@@ -581,19 +593,21 @@ auto CMisc::OnCreateMove( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
if ( !pUserCmd )
return;
if ( Settings::Triggerbot::Active )
const bool bSafeMode = Settings::SafeMode::Active;
if ( !bSafeMode && Settings::Triggerbot::Active )
RunTriggerbot( pInput , pUserCmd );
if ( Settings::Legitbot::Active )
RunLegitbot( pInput , pUserCmd );
if ( Settings::Ragebot::Active )
if ( !bSafeMode && Settings::Ragebot::Active )
RunRagebot( pInput , pUserCmd );
if ( Settings::AntiAim::Active )
if ( !bSafeMode && Settings::AntiAim::Active )
RunAntiAim( pInput , pUserCmd );
if ( Settings::Misc::Bunnyhop )
if ( !bSafeMode && Settings::Misc::Bunnyhop )
{
auto* pLocalPawn = GetCL_Players()->GetLocalPlayerPawn();
@@ -621,9 +635,10 @@ auto CMisc::OnCreateMove( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
}
}
if ( !bSafeMode )
RunMovement( pInput , pUserCmd );
if ( Settings::Misc::FOVChanger )
if ( !bSafeMode && Settings::Misc::FOVChanger )
{
auto* pLocalPawn = GetCL_Players()->GetLocalPlayerPawn();
@@ -1388,7 +1403,12 @@ auto CMisc::RunTriggerbot( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
if ( bTargetValid && !Settings::Triggerbot::SeedTrigger && Settings::Triggerbot::Hitchance > 0 )
{
const QAngle ViewAngles = *CCSGOInput_GetViewAngles( pInput , 0 );
const QAngle* pViewAngles = CCSGOInput_GetViewAngles( pInput , 0 );
if ( !pViewAngles )
return;
const QAngle ViewAngles = *pViewAngles;
const float flHitchance = CalculateHitchance( pInput , pTargetPawn , ViewAngles , Settings::Triggerbot::HitchanceSamples );
@@ -1528,7 +1548,12 @@ auto CMisc::RunRagebot( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
const Vector3 vEyeOrigin = GetCL_Players()->GetLocalEyeOrigin();
const QAngle ViewAngles = *CCSGOInput_GetViewAngles( pInput , 0 );
const QAngle* pViewAngles = CCSGOInput_GetViewAngles( pInput , 0 );
if ( !pViewAngles )
return;
const QAngle ViewAngles = *pViewAngles;
struct RageHitbox
{
@@ -1985,7 +2010,12 @@ auto CMisc::RunAntiAim( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
if ( Settings::AntiAim::OnlyWhenTarget && !bAnyVisible )
return;
const QAngle ViewAngles = *CCSGOInput_GetViewAngles( pInput , 0 );
const QAngle* pViewAngles = CCSGOInput_GetViewAngles( pInput , 0 );
if ( !pViewAngles )
return;
const QAngle ViewAngles = *pViewAngles;
QAngle FinalAngles = ViewAngles;
@@ -2134,7 +2164,12 @@ auto CMisc::RunLegitbot( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
const Vector3 vEyeOrigin = GetCL_Players()->GetLocalEyeOrigin();
const QAngle ViewAngles = *CCSGOInput_GetViewAngles( pInput , 0 );
const QAngle* pViewAngles = CCSGOInput_GetViewAngles( pInput , 0 );
if ( !pViewAngles )
return;
const QAngle ViewAngles = *pViewAngles;
struct LegitHitbox
{
@@ -2152,6 +2187,8 @@ auto CMisc::RunLegitbot( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
{ "pelvis" , Settings::Legitbot::Hitbox_Pelvis , false },
};
const bool bVisibleOnly = Settings::Legitbot::VisibleOnly || Settings::SafeMode::Active;
struct LegitCandidate
{
C_CSPlayerPawn* pPawn = nullptr;
@@ -2209,7 +2246,7 @@ auto CMisc::RunLegitbot( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void
if ( vPoint.IsZero() )
continue;
if ( Settings::Legitbot::VisibleOnly && !GetCL_VisibleCheck()->IsBoneVisible( pPawn , vPoint ) )
if ( bVisibleOnly && !GetCL_VisibleCheck()->IsBoneVisible( pPawn , vPoint ) )
continue;
Vector3 vDelta = vPoint - vEyeOrigin;
@@ -2411,7 +2448,12 @@ auto CMisc::CalculateSeedDirection( CCSGOInput* pInput , CUserCmd* pUserCmd , Ve
if ( !pWeapon )
return false;
const QAngle ViewAngles = *CCSGOInput_GetViewAngles( pInput , 0 );
const QAngle* pViewAngles = CCSGOInput_GetViewAngles( pInput , 0 );
if ( !pViewAngles )
return false;
const QAngle ViewAngles = *pViewAngles;
int iSeed = 0;
@@ -2450,6 +2492,9 @@ auto CMisc::OnFrameStageNotify( int FrameStage ) -> void
if ( FrameStage != 6 )
return;
if ( Settings::SafeMode::Active )
return;
if ( !Settings::Misc::NoFlash )
return;
@@ -108,6 +108,12 @@ auto CAndromedaMenu::RenderVisualPanel() -> void
{
ImGui::SeparatorText( "Visuals" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
return;
}
Checkbox( "Enabled" , Settings::Visual::Active );
Checkbox( "Teammates" , Settings::Visual::Team );
Checkbox( "Enemies" , Settings::Visual::Enemy );
@@ -156,6 +162,12 @@ auto CAndromedaMenu::RenderGlowPanel() -> void
{
ImGui::SeparatorText( "Glow" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
return;
}
Checkbox( "Glow Enabled" , Settings::Visual::Glow );
if ( Settings::Visual::Glow )
@@ -344,6 +356,12 @@ auto CAndromedaMenu::RenderMiscPanel() -> void
{
ImGui::SeparatorText( "Movement" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
return;
}
Checkbox( "Bunnyhop" , Settings::Misc::Bunnyhop );
Checkbox( "Perfect Bhop" , Settings::Misc::PerfectBhop );
Checkbox( "Auto-Strafe" , Settings::Misc::AutoStrafe );
@@ -469,6 +487,12 @@ auto CAndromedaMenu::RenderLegitbotPanel() -> void
ImGui::SeparatorText( "Triggerbot" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
}
else
{
Checkbox( "Triggerbot" , Settings::Triggerbot::Active );
if ( Settings::Triggerbot::Active )
@@ -533,12 +557,19 @@ auto CAndromedaMenu::RenderLegitbotPanel() -> void
Checkbox( "Arme" , Settings::Triggerbot::Hitbox_Arms );
Checkbox( "Beine" , Settings::Triggerbot::Hitbox_Legs );
}
}
}
auto CAndromedaMenu::RenderRagebotPanel() -> void
{
ImGui::SeparatorText( "Ragebot" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
return;
}
Checkbox( "Enabled" , Settings::Ragebot::Active );
if ( !Settings::Ragebot::Active )
@@ -661,6 +692,12 @@ auto CAndromedaMenu::RenderAntiAimPanel() -> void
{
ImGui::SeparatorText( "Anti-Aim" );
if ( Settings::SafeMode::Active )
{
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 1.f ) , "%s" , "Deaktiviert (Safe Mode)" );
return;
}
Checkbox( "Enabled" , Settings::AntiAim::Active );
if ( !Settings::AntiAim::Active )
@@ -751,6 +788,21 @@ auto CAndromedaMenu::RenderAntiAimPanel() -> void
auto CAndromedaMenu::RenderConfigPanel() -> void
{
ImGui::SeparatorText( "VACNet Safe Mode" );
Checkbox( "Safe Mode aktivieren" , Settings::SafeMode::Active );
Checkbox( "Indikator anzeigen" , Settings::SafeMode::DrawIndicator );
if ( Settings::SafeMode::Active )
ImGui::TextColored( ImVec4( 0.f , 1.f , 0.2f , 1.f ) , "%s" , "AKTIV - alle riskanten Features sind deaktiviert." );
else
ImGui::TextColored( ImVec4( 0.6f , 0.6f , 0.6f , 1.f ) , "%s" , "Aus - alle Features sind verfügbar." );
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 0.9f ) , "%s" , "Deaktiviert: Ragebot, Triggerbot, Anti-Aim, NoSpread," );
ImGui::TextColored( ImVec4( 1.f , 0.4f , 0.4f , 0.9f ) , "%s" , "Movement-Hacks, NoFlash, FOV-Changer sowie alle ESP/Glow/Chams." );
ImGui::TextColored( ImVec4( 0.f , 1.f , 0.2f , 1.f ) , "%s" , "Aktiv bleibt: Legit-Aim (weiches Zielen auf sichtbare Gegner)." );
ImGui::SeparatorText( "Menu" );
SliderInt( "Menu Alpha" , Settings::Menu::MenuAlpha , 100 , 255 );
@@ -200,6 +200,15 @@ namespace Settings
// --- Overlay ---
inline auto DrawIndicator = false;
}
namespace SafeMode
{
// VACNet-Safe-Modus: schaltet alle Features ab, die erkannt werden könnten.
// Deaktiviert: Ragebot, Triggerbot, Anti-Aim, NoSpread, alle Movement-Hacks,
// NoFlash, FOV-Changer sowie sämtliche ESP/Glow/Chams-Visuals.
// Aktiv bleibt nur der Legit-Aim (weiches Zielen auf sichtbare Gegner).
inline auto Active = false;
inline auto DrawIndicator = true; // "[SAFE MODE]" oben links anzeigen
}
namespace Colors
{
namespace Visual
@@ -5,13 +5,14 @@
#include <CS2/SDK/SDK.hpp>
#include <CS2/SDK/Interface/IEngineToClient.hpp>
#include <AndromedaClient/Settings/Settings.hpp>
#include <AndromedaClient/Features/CVisual/CVisual.hpp>
auto Hook_DrawGlow( CGlowProperty* pCGlowProperty ) -> void*
{
auto pResult = DrawGlow_o( pCGlowProperty );
if ( SDK::Interfaces::EngineToClient()->IsInGame() )
if ( !Settings::SafeMode::Active && SDK::Interfaces::EngineToClient()->IsInGame() )
GetVisual()->OnDrawGlow( pCGlowProperty );
return pResult;
@@ -1,10 +1,11 @@
#include "Hook_OnDrawObject.hpp"
#include <AndromedaClient/Settings/Settings.hpp>
#include <AndromedaClient/Features/CChams/CChams.hpp>
auto Hook_OnDrawObject( void* pAnimatableSceneObjectDesc , void* pDx11 , void* pMeshData , int nDataCount , void* pSceneView , void* pSceneLayer , void* pUnk , void* pUnk2 ) -> void
{
if ( GetChams()->OnDrawObject( pAnimatableSceneObjectDesc , pDx11 , pMeshData , nDataCount , pSceneView , pSceneLayer , pUnk , pUnk2 ) )
if ( !Settings::SafeMode::Active && GetChams()->OnDrawObject( pAnimatableSceneObjectDesc , pDx11 , pMeshData , nDataCount , pSceneView , pSceneLayer , pUnk , pUnk2 ) )
return;
OnDrawObject_o( pAnimatableSceneObjectDesc , pDx11 , pMeshData , nDataCount , pSceneView , pSceneLayer , pUnk , pUnk2 );