From 767762c6a854556e2f1f0ebb69829a8aa9c9a9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Krupi=C5=84ski?= Date: Sat, 14 Oct 2023 12:14:53 +0200 Subject: [PATCH] Add ClientPatterns::transformTranslate3dVMT() --- Source/MemoryPatterns/ClientPatterns.h | 1 + Source/MemoryPatterns/Linux/ClientPatternsLinux.h | 5 +++++ Source/MemoryPatterns/Windows/ClientPatternsWindows.h | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/Source/MemoryPatterns/ClientPatterns.h b/Source/MemoryPatterns/ClientPatterns.h index 1b342daa889..c8e6dae7088 100644 --- a/Source/MemoryPatterns/ClientPatterns.h +++ b/Source/MemoryPatterns/ClientPatterns.h @@ -24,4 +24,5 @@ struct ClientPatterns { [[nodiscard]] static cs2::ClientModeCSNormal* clientMode() noexcept; [[nodiscard]] static ReturnAddress getWorldSessionInClientMode() noexcept; [[nodiscard]] static cs2::C_CSGameRules** gameRules() noexcept; + [[nodiscard]] static const void* transformTranslate3dVMT() noexcept; }; diff --git a/Source/MemoryPatterns/Linux/ClientPatternsLinux.h b/Source/MemoryPatterns/Linux/ClientPatternsLinux.h index 8e9d855b359..c3e5f57ec66 100644 --- a/Source/MemoryPatterns/Linux/ClientPatternsLinux.h +++ b/Source/MemoryPatterns/Linux/ClientPatternsLinux.h @@ -53,3 +53,8 @@ inline cs2::C_CSGameRules** ClientPatterns::gameRules() noexcept { return GlobalContext::instance().clientPatternFinder("4C 8D 35 ? ? ? ? 49 8B 3E 48 85 FF 0F 84 ? ? ? ? 41 80 BC 24"_pat).add(3).abs().as(); } + +inline const void* ClientPatterns::transformTranslate3dVMT() noexcept +{ + return GlobalContext::instance().clientPatternFinder("48 8D 0D ? ? ? ? 48 89 08 48 89 50 08 48 8B 53 10"_pat).add(3).abs().as(); +} diff --git a/Source/MemoryPatterns/Windows/ClientPatternsWindows.h b/Source/MemoryPatterns/Windows/ClientPatternsWindows.h index cb505587e9b..fc6a6e816e7 100644 --- a/Source/MemoryPatterns/Windows/ClientPatternsWindows.h +++ b/Source/MemoryPatterns/Windows/ClientPatternsWindows.h @@ -53,3 +53,8 @@ inline cs2::C_CSGameRules** ClientPatterns::gameRules() noexcept { return GlobalContext::instance().clientPatternFinder("48 8B 0D ? ? ? ? 48 85 C9 0F 84 ? ? ? ? 80 BE"_pat).add(3).abs().as(); } + +inline const void* ClientPatterns::transformTranslate3dVMT() noexcept +{ + return GlobalContext::instance().clientPatternFinder("48 8D 05 ? ? ? ? 48 C7 42 ? 00"_pat).add(3).abs().as(); +}