From 4fed9fd12f5b5e4a70c35d1f9e51a8c277ce9322 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Sun, 30 Aug 2026 12:53:06 +0700 Subject: [PATCH] [saco] Implement/match `CRadar__DrawMap__FindPlayerSpeed_Hook` --- saco/game/hooks.cpp | 12 +++++++++++- saco/game/playerped.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/saco/game/hooks.cpp b/saco/game/hooks.cpp index a65ff6e..6681963 100644 --- a/saco/game/hooks.cpp +++ b/saco/game/hooks.cpp @@ -46,6 +46,7 @@ DWORD dwParam2; DWORD dwParamThis; DWORD unnamed_101516D4; +DWORD unnamed_10151710; DWORD unnamed_10151810; DWORD unnamed_10151814; DWORD unnamed_10151818; @@ -761,7 +762,16 @@ NUDE CObject__Render_Hook() NUDE CRadar__DrawMap__FindPlayerSpeed_Hook() { - // TODO: CRadar__DrawMap__FindPlayerSpeed_Hook + // keep the map still while the local player is a vehicle passenger + if(pGame && pGame->FindPlayerPed() && pGame->FindPlayerPed()->IsInVehicle() && + pGame->FindPlayerPed()->sub_100ABFC0()) + { + _asm lea eax, unnamed_10151710 + _asm ret + } + + _asm mov edx, 0x56E090 ;// FindPlayerSpeed + _asm jmp edx } //----------------------------------------------------------- diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 0e2273a..315a970 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -49,6 +49,7 @@ public: void SetStateFlags(DWORD dwStateFlags); BOOL IsDead(); BOOL IsInVehicle(); + BOOL sub_100ABFC0(); // .text:100ABFC0 BYTE GetActionTrigger(); void SetActionTrigger(BYTE byteTrigger);