From 356a762b4ad6e6e5a60a0a2b78511e16ef6cc8c4 Mon Sep 17 00:00:00 2001 From: RD42 Date: Sun, 4 May 2025 09:24:37 -0700 Subject: [PATCH] [saco] Implement/match `FUNC_100B43F0(...)` --- saco/game/util.cpp | 20 ++++++++++++++++++++ saco/game/util.h | 1 + 2 files changed, 21 insertions(+) diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 9f7d2ec..b430805 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -467,6 +467,26 @@ struc_13 * __stdcall FUNC_100B43D0(BYTE bytePlayer) //----------------------------------------------------------- +BYTE __stdcall FUNC_100B43F0(DWORD *pdwRenderWare) +{ + BYTE x = 0; + while(x != PLAYER_PED_SLOTS) + { + ENTITY_TYPE *pEntity = (ENTITY_TYPE *)dwPlayerPedPtrs[x]; + if(pEntity) + { + if(pEntity->pdwRenderWare) + { + if(pEntity->pdwRenderWare == pdwRenderWare) + return x; + } + } + x++; + } + return 0; +} + +//----------------------------------------------------------- diff --git a/saco/game/util.h b/saco/game/util.h index ae04259..5001a17 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -40,6 +40,7 @@ DWORD __stdcall GetPlayerPedPtrRecord(BYTE bytePlayer); BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr); void __stdcall FUNC_100B4390(BYTE bytePlayer, DWORD a2, DWORD a3, DWORD a4, DWORD a5); struc_13 * __stdcall FUNC_100B43D0(BYTE bytePlayer); +BYTE __stdcall FUNC_100B43F0(DWORD *pdwRenderWare); float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2); float DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2); float DistanceBetweenPoints(float x1, float y1, float z1, float x2, float y2, float z2);