diff --git a/Source/FeatureHelpers/FeatureHelpers.h b/Source/FeatureHelpers/FeatureHelpers.h index 64b75626c8b..eef5307c5e5 100644 --- a/Source/FeatureHelpers/FeatureHelpers.h +++ b/Source/FeatureHelpers/FeatureHelpers.h @@ -21,7 +21,7 @@ struct FeatureHelpers { , worldtoClipSpaceConverter{memoryPatterns.clientPatterns()} , viewToProjectionMatrix{memoryPatterns.clientPatterns()} , stylePropertiesSymbolsAndVMTs{StylePropertySymbolMap{memoryPatterns.panelStylePatterns().stylePropertiesSymbols()}, panoramaVmtFinder} - , gameRules{memoryPatterns.clientPatterns().gameRules()} + , gameRules{memoryPatterns.gameRulesPatterns().gameRules()} , mainMenuProvider{memoryPatterns.clientPatterns()} , localPlayerController{memoryPatterns.clientPatterns().localPlayerController()} , entitiesVMTs{clientVmtFinder} diff --git a/Source/MemoryPatterns/Linux/ClientPatternsLinux.h b/Source/MemoryPatterns/Linux/ClientPatternsLinux.h index 2b8f37b89f0..ec183cacd74 100644 --- a/Source/MemoryPatterns/Linux/ClientPatternsLinux.h +++ b/Source/MemoryPatterns/Linux/ClientPatternsLinux.h @@ -50,11 +50,6 @@ struct ClientPatterns { return patternFinders.clientPatternFinder("FF 10 49 89 C5 48 85 C0 0F 84"_pat).add(2).template as(); } - [[nodiscard]] cs2::C_CSGameRules** gameRules() const noexcept - { - return patternFinders.clientPatternFinder("4C 8D ? ? ? ? ? 49 8B ? 48 85 FF 0F 84 ? ? ? ? 41 80 BC 24"_pat).add(3).abs().template as(); - } - [[nodiscard]] const void* transformTranslate3dVMT() const noexcept { return patternFinders.clientPatternFinder("48 8D 0D ? ? ? ? 48 89 08 48 89 50 08 48 8B 53 10"_pat).add(3).abs().template as(); diff --git a/Source/MemoryPatterns/Linux/GameRulesPatternsLinux.h b/Source/MemoryPatterns/Linux/GameRulesPatternsLinux.h index f0b070b5043..b902fa80d80 100644 --- a/Source/MemoryPatterns/Linux/GameRulesPatternsLinux.h +++ b/Source/MemoryPatterns/Linux/GameRulesPatternsLinux.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -7,6 +8,11 @@ template struct GameRulesPatterns { const PatternFinders& patternFinders; + [[nodiscard]] cs2::C_CSGameRules** gameRules() const noexcept + { + return patternFinders.clientPatternFinder("4C 8D ? ? ? ? ? 49 8B ? 48 85 FF 0F 84 ? ? ? ? 41 80 BC 24"_pat).add(3).abs().template as(); + } + [[nodiscard]] RoundStartTimeOffset roundStartTimeOffset() const noexcept { return patternFinders.clientPatternFinder("F3 0F 10 43 ? F3 0F 5C C1 66 0F EF C9 F3 0F 2A"_pat).add(4).template readOffset(); diff --git a/Source/MemoryPatterns/Windows/ClientPatternsWindows.h b/Source/MemoryPatterns/Windows/ClientPatternsWindows.h index 4c21e551193..5c80828738b 100644 --- a/Source/MemoryPatterns/Windows/ClientPatternsWindows.h +++ b/Source/MemoryPatterns/Windows/ClientPatternsWindows.h @@ -52,11 +52,6 @@ struct ClientPatterns { return patternFinders.clientPatternFinder("FF 10 ? 8B F0 48 85 C0 0F 84"_pat).add(2).template as(); } - [[nodiscard]] cs2::C_CSGameRules** gameRules() const noexcept - { - return patternFinders.clientPatternFinder("48 8B 0D ? ? ? ? 48 85 C9 0F 84 ? ? ? ? 80 BE"_pat).add(3).abs().template as(); - } - [[nodiscard]] const void* transformTranslate3dVMT() const noexcept { return patternFinders.clientPatternFinder("48 8D 05 ? ? ? ? 48 C7 42 ? 00"_pat).add(3).abs().template as(); diff --git a/Source/MemoryPatterns/Windows/GameRulesPatternsWindows.h b/Source/MemoryPatterns/Windows/GameRulesPatternsWindows.h index b3f32e83eaf..5df44c8e088 100644 --- a/Source/MemoryPatterns/Windows/GameRulesPatternsWindows.h +++ b/Source/MemoryPatterns/Windows/GameRulesPatternsWindows.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include @@ -7,6 +8,11 @@ template struct GameRulesPatterns { const PatternFinders& patternFinders; + [[nodiscard]] cs2::C_CSGameRules** gameRules() const noexcept + { + return patternFinders.clientPatternFinder("48 8B 0D ? ? ? ? 48 85 C9 0F 84 ? ? ? ? 80 BE"_pat).add(3).abs().template as(); + } + [[nodiscard]] RoundStartTimeOffset roundStartTimeOffset() const noexcept { return patternFinders.clientPatternFinder("F3 0F 10 43 ? 0F 5B C9"_pat).add(4).template readOffset();