mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-11 01:38:13 +08:00
fix(anticheat): some more changes?
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user