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 }; //----------------------------------------------------