[IW4MVM] Easily switch the component off
This commit is contained in:
parent
5d4cd82ed1
commit
c7b5d5a2b8
@ -49,7 +49,7 @@ namespace Components
|
||||
Loader::Register(new Zones());
|
||||
Loader::Register(new Colors());
|
||||
Loader::Register(new D3D9Ex());
|
||||
#if !defined(VLD_RPTHOOK_INSTALL) || defined(VLDEnable) // IW4MVM uses detours which produces memory leaks, but those are not really relevant
|
||||
#if (!defined(VLD_RPTHOOK_INSTALL) || defined(VLDEnable)) && defined(COMPILE_IW4MVM) // IW4MVM uses detours which produces memory leaks, but those are not really relevant
|
||||
Loader::Register(new IW4MVM());
|
||||
#endif
|
||||
Loader::Register(new Logger());
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "STDInclude.hpp"
|
||||
|
||||
#ifdef COMPILE_IW4MVM
|
||||
#include <IW4MVM/client_main.h>
|
||||
#endif
|
||||
|
||||
namespace Components
|
||||
{
|
||||
@ -11,8 +14,10 @@ namespace Components
|
||||
std::uint8_t* module = reinterpret_cast<std::uint8_t*>(GetModuleHandle(nullptr));
|
||||
VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READWRITE, &oldProtect);
|
||||
|
||||
#ifdef COMPILE_IW4MVM
|
||||
client_main::Init();
|
||||
Scheduler::Once(client_main::PostInit);
|
||||
#endif
|
||||
Scheduler::OnFrame([]()
|
||||
{
|
||||
if (!Game::CL_IsCgameInitialized())
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#define COMPILE_IW4MVM
|
||||
|
||||
namespace Components
|
||||
{
|
||||
class IW4MVM : public Component
|
||||
|
Loading…
Reference in New Issue
Block a user