From aed23bcdd64dbf2f8874639acb4d5ff35e55831d Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Sat, 21 Jun 2025 12:43:21 -0400 Subject: [PATCH] fix(anticheat): some more changes? --- .../BattlEyeServerProcessPlayerJoin.cpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/game/hooks/Anticheat/BattlEyeServerProcessPlayerJoin.cpp b/src/game/hooks/Anticheat/BattlEyeServerProcessPlayerJoin.cpp index d97d9ae..bf03acc 100644 --- a/src/game/hooks/Anticheat/BattlEyeServerProcessPlayerJoin.cpp +++ b/src/game/hooks/Anticheat/BattlEyeServerProcessPlayerJoin.cpp @@ -4,25 +4,29 @@ #include "game/hooks/Hooks.hpp" #include "game/gta/Natives.hpp" #include "types/battleye/CBattlEyePlayerModifyContext.hpp" +#include "game/backend/AnticheatBypass.hpp" namespace YimMenu::Hooks { bool Anticheat::BattlEyeServerProcessPlayerJoin(CBattlEyePlayerModifyInterface* server_iface, CBattlEyePlayerModifyContext* context) { - if (context->m_IsLocal) + if (!AnticheatBypass::IsBattlEyeRunning()) { - if (NETWORK::NETWORK_SESSION_IS_CLOSED_FRIENDS() || NETWORK::NETWORK_SESSION_IS_CLOSED_CREW() || NETWORK::NETWORK_SESSION_IS_SOLO() || NETWORK::NETWORK_SESSION_IS_PRIVATE()) + if (context->m_IsLocal) + { + if (NETWORK::NETWORK_SESSION_IS_CLOSED_FRIENDS() || NETWORK::NETWORK_SESSION_IS_CLOSED_CREW() || NETWORK::NETWORK_SESSION_IS_SOLO() || NETWORK::NETWORK_SESSION_IS_PRIVATE()) + { + return true; + } + } + + static auto cheater_pool = Commands::GetCommand("cheaterpool"_J); + if (cheater_pool->GetState()) { return true; } } - static auto cheater_pool = Commands::GetCommand("cheaterpool"_J); - if (cheater_pool->GetState()) - { - return true; - } - return BaseHook::Get>()->Original()(server_iface, context); } } \ No newline at end of file