[IW4MVM] Disable the mod when it's not needed
This commit is contained in:
parent
ff55efb4fd
commit
d9ad474905
@ -5,6 +5,8 @@ namespace Components
|
|||||||
{
|
{
|
||||||
IW4MVM::IW4MVM()
|
IW4MVM::IW4MVM()
|
||||||
{
|
{
|
||||||
|
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled() || Monitor::IsEnabled() || Loader::IsPerformingUnitTests()) return;
|
||||||
|
|
||||||
DWORD oldProtect;
|
DWORD oldProtect;
|
||||||
std::uint8_t* module = reinterpret_cast<std::uint8_t*>(GetModuleHandle(nullptr));
|
std::uint8_t* module = reinterpret_cast<std::uint8_t*>(GetModuleHandle(nullptr));
|
||||||
VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||||
|
Loading…
Reference in New Issue
Block a user