From 06c3ad81e58e0b4b5e4488c8184bcc3f28137054 Mon Sep 17 00:00:00 2001 From: whitehai11 Date: Wed, 5 Aug 2026 18:44:16 +0200 Subject: [PATCH] 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 --- .../AndromedaClient/CAndromedaClient.cpp | 9 +- .../AndromedaClient/Features/CMisc/CMisc.cpp | 85 ++++++--- .../AndromedaClient/GUI/CAndromedaMenu.cpp | 168 ++++++++++++------ .../AndromedaClient/Settings/Settings.hpp | 9 + .../CS2/Hook/Hook_DrawGlow.cpp | 3 +- .../CS2/Hook/Hook_OnDrawObject.cpp | 3 +- 6 files changed, 195 insertions(+), 82 deletions(-) diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/CAndromedaClient.cpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/CAndromedaClient.cpp index f584f8c..23ffdd8 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/CAndromedaClient.cpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/CAndromedaClient.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -63,14 +64,18 @@ auto CAndromedaClient::OnClientOutput() -> void { if ( SDK::Interfaces::EngineToClient()->IsInGame() ) { - GetVisual()->OnClientOutput(); + if ( !Settings::SafeMode::Active ) + GetVisual()->OnClientOutput(); + GetMisc()->OnClientOutput(); } } auto CAndromedaClient::OnCreateMove( CCSGOInput* pInput , CUserCmd* pUserCmd ) -> void { - GetVisual()->OnCreateMove(); + if ( !Settings::SafeMode::Active ) + GetVisual()->OnCreateMove(); + GetMisc()->OnCreateMove( pInput , pUserCmd ); } diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Features/CMisc/CMisc.cpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Features/CMisc/CMisc.cpp index e92e748..b0e6269 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Features/CMisc/CMisc.cpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Features/CMisc/CMisc.cpp @@ -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( 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( 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 } } - RunMovement( pInput , pUserCmd ); + 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; diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/GUI/CAndromedaMenu.cpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/GUI/CAndromedaMenu.cpp index ce2fb63..5aa26df 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/GUI/CAndromedaMenu.cpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/GUI/CAndromedaMenu.cpp @@ -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,69 +487,76 @@ auto CAndromedaMenu::RenderLegitbotPanel() -> void ImGui::SeparatorText( "Triggerbot" ); - Checkbox( "Triggerbot" , Settings::Triggerbot::Active ); - - if ( Settings::Triggerbot::Active ) + if ( Settings::SafeMode::Active ) { - const char* TriggerModeItems[] = + 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 ) { - "Hold Key" , "Always" , "Toggle" - }; - - Combo( "Mode" , Settings::Triggerbot::Mode , TriggerModeItems , IM_ARRAYSIZE( TriggerModeItems ) ); - - static const char* TriggerKeyItems[] = - { - "Alt" , "Shift" , "Ctrl" , "Mouse 4" , "Mouse 5" , "Q" , "E" , "F" , "X" , "C" , "V" , "B" , "Space" - }; - - static const int TriggerKeys[] = - { - VK_MENU , VK_SHIFT , VK_CONTROL , 0x04 , 0x05 , 0x51 , 0x45 , 0x46 , 0x58 , 0x43 , 0x56 , 0x42 , VK_SPACE - }; - - int iKeyIdx = 0; - - for ( int i = 0; i < IM_ARRAYSIZE( TriggerKeys ); i++ ) - { - if ( TriggerKeys[ i ] == Settings::Triggerbot::Key ) + const char* TriggerModeItems[] = { - iKeyIdx = i; - break; + "Hold Key" , "Always" , "Toggle" + }; + + Combo( "Mode" , Settings::Triggerbot::Mode , TriggerModeItems , IM_ARRAYSIZE( TriggerModeItems ) ); + + static const char* TriggerKeyItems[] = + { + "Alt" , "Shift" , "Ctrl" , "Mouse 4" , "Mouse 5" , "Q" , "E" , "F" , "X" , "C" , "V" , "B" , "Space" + }; + + static const int TriggerKeys[] = + { + VK_MENU , VK_SHIFT , VK_CONTROL , 0x04 , 0x05 , 0x51 , 0x45 , 0x46 , 0x58 , 0x43 , 0x56 , 0x42 , VK_SPACE + }; + + int iKeyIdx = 0; + + for ( int i = 0; i < IM_ARRAYSIZE( TriggerKeys ); i++ ) + { + if ( TriggerKeys[ i ] == Settings::Triggerbot::Key ) + { + iKeyIdx = i; + break; + } } + + if ( Combo( "Key" , iKeyIdx , TriggerKeyItems , IM_ARRAYSIZE( TriggerKeyItems ) ) ) + Settings::Triggerbot::Key = TriggerKeys[ iKeyIdx ]; + + SliderInt( "Delay (ms)" , Settings::Triggerbot::Delay , 0 , 300 ); + SliderInt( "Hold Time (ms)" , Settings::Triggerbot::HoldTime , 0 , 200 ); + + ImGui::Separator(); + + Checkbox( "Seed-Modus (deterministisch)" , Settings::Triggerbot::SeedTrigger ); + + if ( !Settings::Triggerbot::SeedTrigger ) + { + SliderInt( "Hitchance (%)" , Settings::Triggerbot::Hitchance , 0 , 100 , Settings::Triggerbot::Hitchance > 0 ? "%d%%" : "%d (aus)" ); + + if ( Settings::Triggerbot::Hitchance > 0 ) + SliderInt( "Hitchance Samples" , Settings::Triggerbot::HitchanceSamples , 16 , 128 ); + } + + ImGui::Separator(); + + Checkbox( "Nur gescoped (Sniper)" , Settings::Triggerbot::ScopedOnly ); + Checkbox( "Teammates ignorieren" , Settings::Triggerbot::IgnoreTeammates ); + Checkbox( "Fadenkreuz-Indikator" , Settings::Triggerbot::DrawIndicator ); + + ImGui::Separator(); + + Checkbox( "Kopf" , Settings::Triggerbot::Hitbox_Head ); + Checkbox( "Brust" , Settings::Triggerbot::Hitbox_Chest ); + Checkbox( "Bauch" , Settings::Triggerbot::Hitbox_Stomach ); + Checkbox( "Arme" , Settings::Triggerbot::Hitbox_Arms ); + Checkbox( "Beine" , Settings::Triggerbot::Hitbox_Legs ); } - - if ( Combo( "Key" , iKeyIdx , TriggerKeyItems , IM_ARRAYSIZE( TriggerKeyItems ) ) ) - Settings::Triggerbot::Key = TriggerKeys[ iKeyIdx ]; - - SliderInt( "Delay (ms)" , Settings::Triggerbot::Delay , 0 , 300 ); - SliderInt( "Hold Time (ms)" , Settings::Triggerbot::HoldTime , 0 , 200 ); - - ImGui::Separator(); - - Checkbox( "Seed-Modus (deterministisch)" , Settings::Triggerbot::SeedTrigger ); - - if ( !Settings::Triggerbot::SeedTrigger ) - { - SliderInt( "Hitchance (%)" , Settings::Triggerbot::Hitchance , 0 , 100 , Settings::Triggerbot::Hitchance > 0 ? "%d%%" : "%d (aus)" ); - - if ( Settings::Triggerbot::Hitchance > 0 ) - SliderInt( "Hitchance Samples" , Settings::Triggerbot::HitchanceSamples , 16 , 128 ); - } - - ImGui::Separator(); - - Checkbox( "Nur gescoped (Sniper)" , Settings::Triggerbot::ScopedOnly ); - Checkbox( "Teammates ignorieren" , Settings::Triggerbot::IgnoreTeammates ); - Checkbox( "Fadenkreuz-Indikator" , Settings::Triggerbot::DrawIndicator ); - - ImGui::Separator(); - - Checkbox( "Kopf" , Settings::Triggerbot::Hitbox_Head ); - Checkbox( "Brust" , Settings::Triggerbot::Hitbox_Chest ); - Checkbox( "Bauch" , Settings::Triggerbot::Hitbox_Stomach ); - Checkbox( "Arme" , Settings::Triggerbot::Hitbox_Arms ); - Checkbox( "Beine" , Settings::Triggerbot::Hitbox_Legs ); } } @@ -539,6 +564,12 @@ 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 ); diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Settings/Settings.hpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Settings/Settings.hpp index a4c0c2c..f3db4a0 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Settings/Settings.hpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/AndromedaClient/Settings/Settings.hpp @@ -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 diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_DrawGlow.cpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_DrawGlow.cpp index f5b9ece..0bd7839 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_DrawGlow.cpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_DrawGlow.cpp @@ -5,13 +5,14 @@ #include #include +#include #include 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; diff --git a/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_OnDrawObject.cpp b/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_OnDrawObject.cpp index b614f00..64d4c77 100644 --- a/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_OnDrawObject.cpp +++ b/Andromeda-CS2-Base/Andromeda-CS2-Base/CS2/Hook/Hook_OnDrawObject.cpp @@ -1,10 +1,11 @@ #include "Hook_OnDrawObject.hpp" +#include #include 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 );