fix(anticheat): some more changes?

This commit is contained in:
maybegreat48 committed 2025-06-21 12:43:21 -04:00
1 parent f6f39f35be
commit aed23bcdd6
1 file changed
+12 -8
@@ -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<BoolCommand>("cheaterpool"_J);
if (cheater_pool->GetState())
{
return true;
}
}
static auto cheater_pool = Commands::GetCommand<BoolCommand>("cheaterpool"_J);
if (cheater_pool->GetState())
{
return true;
}
return BaseHook::Get<Anticheat::BattlEyeServerProcessPlayerJoin, DetourHook<decltype(&Anticheat::BattlEyeServerProcessPlayerJoin)>>()->Original()(server_iface, context);
}
}