diff --git a/src/tool/wkUnlimiter/main.cpp b/src/tool/wkUnlimiter/main.cpp index 14fe79c..f826c5c 100644 --- a/src/tool/wkUnlimiter/main.cpp +++ b/src/tool/wkUnlimiter/main.cpp @@ -7,6 +7,7 @@ // ---- Configuration ---- +BOOL cfgAllowMultiInstance; BOOL cfgEnableAllControls; BOOL cfgUnlockCamera; BOOL cfgUnlockCursor; @@ -16,11 +17,13 @@ void configure() wk::Config config("wkUnlimiter.ini"); // Load INI settings. + config.get("Common", "AllowMultiInstance", cfgAllowMultiInstance, TRUE); config.get("Frontend", "EnableAllControls", cfgEnableAllControls, TRUE); config.get("Game", "UnlockCamera", cfgUnlockCamera, TRUE); config.get("Game", "UnlockCursor", cfgUnlockCursor, TRUE); // Ensure INI file has been created with default setting. + config.set("Common", "AllowMultiInstance", cfgAllowMultiInstance); config.set("Frontend", "EnableAllControls", cfgEnableAllControls); config.set("Game", "UnlockCamera", cfgUnlockCamera); config.set("Game", "UnlockCursor", cfgUnlockCursor); @@ -30,6 +33,11 @@ void configure() void patch(wk::Exe& exe, int gameVersion) { + if (cfgAllowMultiInstance) + { + wk::Patch patch(exe.Offset(0x000E7AD1), 1); + patch.write((char)0xEB); // Requires WormKitDS as game executable loads modules after this patched out check. + } if (cfgEnableAllControls) { wk::Patch patch(exe.Offset(0x001C5D26), 4);