diff --git a/ChaosMod/Memory/Snow.h b/ChaosMod/Memory/Snow.h index 5f8ff629d..b559b7c6a 100644 --- a/ChaosMod/Memory/Snow.h +++ b/ChaosMod/Memory/Snow.h @@ -15,7 +15,10 @@ namespace Memory static bool init = false; - static auto handle = FindPattern("80 3D ?? ?? ?? ?? 00 74 25 B9 40 00 00 00"); + static bool isPre3095 = getGameVersion() < eGameVersion::VER_1_0_3095_0; + auto snowPattern1 = isPre3095 ? "80 3D ?? ?? ?? ?? 00 74 25 B9 40 00 00 00" + : "44 38 ?? ?? ?? ?? 01 74 12 B9 40 00 00 00"; + static auto handle = FindPattern(snowPattern1); if (!handle.IsValid()) return; @@ -44,7 +47,7 @@ namespace Memory BYTE *from = reinterpret_cast(addr1); from[0] = 0x48; // mov rax, func from[1] = 0xB8; - *reinterpret_cast(&from[2]) = reinterpret_cast(addr1 + 0x1B); + *reinterpret_cast(&from[2]) = reinterpret_cast(addr1 + (isPre3095 ? 0x1B : 0x20)); from[10] = 0x50; // push rax from[11] = 0xC3; // ret }