From 98a428ace9226442fa623a0870af9f7e12f35eb0 Mon Sep 17 00:00:00 2001 From: Amos <48657826+Mauler125@users.noreply.github.com> Date: Fri, 7 Jan 2022 01:03:35 +0100 Subject: [PATCH] Fix S2 crash when launching a different version --- r5dev/engine/debugoverlay.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/r5dev/engine/debugoverlay.h b/r5dev/engine/debugoverlay.h index 076f5319..20bc691b 100644 --- a/r5dev/engine/debugoverlay.h +++ b/r5dev/engine/debugoverlay.h @@ -113,13 +113,10 @@ namespace LPCRITICAL_SECTION s_OverlayMutex = p_DrawAllOverlays.Offset(0x10).FindPatternSelf("48 8D 0D", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7).RCast(); #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) - int* render_tickcount = p_DrawAllOverlays.Offset(0x80).FindPatternSelf("3B 0D 17", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); + int* render_tickcount = p_DrawAllOverlays.Offset(0x80).FindPatternSelf("3B 0D", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); int* overlay_tickcount = p_DrawAllOverlays.Offset(0x70).FindPatternSelf("3B 0D", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); -#elif defined (GAMEDLL_S2) - int* render_tickcount = p_DrawAllOverlays.Offset(0x50).FindPatternSelf("3B 05 79", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); - int* overlay_tickcount = p_DrawAllOverlays.Offset(0x70).FindPatternSelf("3B 05", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); -#elif defined (GAMEDLL_S3) - int* render_tickcount = p_DrawAllOverlays.Offset(0x50).FindPatternSelf("3B 05 B1", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); +#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3) + int* render_tickcount = p_DrawAllOverlays.Offset(0x50).FindPatternSelf("3B 05", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); int* overlay_tickcount = p_DrawAllOverlays.Offset(0x70).FindPatternSelf("3B 05", ADDRESS::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast(); #endif }