We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 45df317 + 30df185 commit debd89aCopy full SHA for debd89a
1 file changed
SSV2/includes/modules/Memory.lua
@@ -46,9 +46,17 @@ end
46
-- Since PatternScanner runs in a fiber, we can't get pointer values on file load.
47
local function SafeGetVersion()
48
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)
+ local ptr, b, o
+ if (Backend:GetAPIVersion() == Enums.eAPIVersion.V1) then
+ 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
+
60
GPointers.GameVersion = {
61
build = b:get_string(),
62
online = o:get_string()
0 commit comments