From 192f9b4a9b0ca14e5d96c370d9163462b499bda8 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 29 Apr 2022 22:07:30 +0200 Subject: [PATCH] Fixup pattern for P_DrawWorldMeshes --- r5dev/engine/gl_rsurf.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/r5dev/engine/gl_rsurf.h b/r5dev/engine/gl_rsurf.h index 76fee7e1..8608c61e 100644 --- a/r5dev/engine/gl_rsurf.h +++ b/r5dev/engine/gl_rsurf.h @@ -28,14 +28,14 @@ class HGL_RSurf : public IDetour #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) P_DrawWorldMeshes = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x8B\xC4\x48\x89\x48\x08\x53\x48\x83\xEC\x70"), "xxxxxxxxxxxx"); #elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3) - P_DrawWorldMeshes = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x40\x56\x57\xB8\x00\x00\x00\x00"), "xxxx????"); + P_DrawWorldMeshes = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x8B\xC4\x48\x89\x48\x08\x53\x57\x41\x55"), "xxxxxxxxxxx"); #endif P_DrawWorldMeshesDepthOnly = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x40\x56\x57\xB8\x00\x00\x00\x00"), "xxxx????"); P_DrawWorldMeshesDepthAtTheEnd = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x57\x48\x83\xEC\x20\x48\x8B\x0D\x00\x00\x00\x00\x41\x8B\xF9"), "xxxx?xxxx?xxxxxxxx????xxx"); - V_DrawWorldMeshes = P_DrawWorldMeshes.RCast(); - V_DrawWorldMeshesDepthOnly = P_DrawWorldMeshesDepthOnly.RCast(); - V_DrawWorldMeshesDepthAtTheEnd = P_DrawWorldMeshesDepthAtTheEnd.RCast(); + V_DrawWorldMeshes = P_DrawWorldMeshes.RCast(); /*48 8B C4 48 89 48 08 53 57 41 55*/ + V_DrawWorldMeshesDepthOnly = P_DrawWorldMeshesDepthOnly.RCast(); /*40 56 57 B8 ?? ?? ?? ??*/ + V_DrawWorldMeshesDepthAtTheEnd = P_DrawWorldMeshesDepthAtTheEnd.RCast(); /*48 89 5C 24 ?? 48 89 74 24 ? 57 48 83 EC 20 48 8B 0D ?? ?? ?? ?? 41 8B F9*/ } virtual void GetVar(void) const { } virtual void GetCon(void) const { }