Skip to content

Commit debd89a

Browse files
authored
Merge pull request #93 from How-Bout-No/enhanced-quickfix
fix(compat): Enhanced Memory quickfix
2 parents 45df317 + 30df185 commit debd89a

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

SSV2/includes/modules/Memory.lua

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,17 @@ end
4646
-- Since PatternScanner runs in a fiber, we can't get pointer values on file load.
4747
local function SafeGetVersion()
4848
if (GPointers.GameVersion.build:isempty()) then
49-
local ptr = memory.scan_pattern("8B C3 33 D2 C6 44 24 20")
50-
local b = ptr:add(0x24):rip()
51-
local o = b:add(0x20)
49+
local ptr, b, o
50+
if (Backend:GetAPIVersion() == Enums.eAPIVersion.V1) then
51+
ptr = memory.scan_pattern("8B C3 33 D2 C6 44 24 20")
52+
b = ptr:add(0x24):rip()
53+
o = b:add(0x20)
54+
else
55+
ptr = memory.scan_pattern("4C 8D 0D ? ? ? ? 48 8D 5C 24 ? 48 89 D9 48 89 FA")
56+
b = ptr:add(0x3):rip()
57+
o = ptr:add(0x47):add(0x3):rip()
58+
end
59+
5260
GPointers.GameVersion = {
5361
build = b:get_string(),
5462
online = o:get_string()

0 commit comments

Comments
 (0)