From 89f12d3d55c4ca43dbca9e99726ae0dbea792223 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Thu, 3 Sep 2026 01:54:30 +0700 Subject: [PATCH] [saco] Match `FUNC_100A3B80`; it maps a ped pointer to its actor id --- saco/game/hooks.cpp | 9 +++++++++ saco/net/actorpool.h | 1 + 2 files changed, 10 insertions(+) diff --git a/saco/game/hooks.cpp b/saco/game/hooks.cpp index 40f3cd8..d1aea2a 100644 --- a/saco/game/hooks.cpp +++ b/saco/game/hooks.cpp @@ -1366,6 +1366,15 @@ DWORD unnamed_101516A4; // CPed * taking the damage int __stdcall FUNC_100A3BB0(DWORD *pEventDamage, PED_TYPE *pPed); // todo: implement `FUNC_100A3BB0` +// maps a ped pointer to the actor that owns it +ACTORID FUNC_100A3B80(DWORD dwPed) +{ + if(!dwPed) return 0xFFFF; + return pNetGame->GetActorPool()->FUNC_100018B0(dwPed); +} + +//----------------------------------------------------------- + NUDE PedDamage_Hook() { __asm diff --git a/saco/net/actorpool.h b/saco/net/actorpool.h index 535bf2f..6348587 100644 --- a/saco/net/actorpool.h +++ b/saco/net/actorpool.h @@ -18,6 +18,7 @@ public: CActorPool(); void sub_100016F0(ACTORID ActorID); // .text:100016F0 + ACTORID FUNC_100018B0(DWORD dwPtr); // .text:100018B0 }; //----------------------------------------------------