From f42a01f653c860b5df3cfdbe34cc37f25dc3c36a Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 14 Dec 2020 09:47:07 +0200 Subject: CPed::SetWeaponLockOnTarget --- src/peds/Ped.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/peds/Ped.h') diff --git a/src/peds/Ped.h b/src/peds/Ped.h index f8e619d7..0e398b25 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -863,6 +863,13 @@ public: SetMoveState(PEDMOVE_WALK); } + inline void SetWeaponLockOnTarget(CEntity *target) + { + m_pPointGunAt = (CPed *)target; + if(target) + ((CEntity *)target)->RegisterReference(&m_pPointGunAt); + } + // Using this to abstract nodes of skinned and non-skinned meshes CVector GetNodePosition(int32 node) { -- cgit v1.2.3