diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-12-19 01:21:04 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-12-19 01:21:04 +0100 |
commit | 8d1996833bd73271ca14a3df46633d9b2ed13052 (patch) | |
tree | daedb1622096e5bb6b8b9ec15882769b827506e1 /src/peds/Ped.h | |
parent | get rid of all PED_SKIN defines (diff) | |
parent | little cleanup of templates (diff) | |
download | re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.gz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.bz2 re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.lz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.xz re3-8d1996833bd73271ca14a3df46633d9b2ed13052.tar.zst re3-8d1996833bd73271ca14a3df46633d9b2ed13052.zip |
Diffstat (limited to 'src/peds/Ped.h')
-rw-r--r-- | src/peds/Ped.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h index fb44f59c..5683c7c9 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -866,7 +866,6 @@ public: void PositionAttachedPed(); bool CanUseTorsoWhenLooking(); void ScanForDelayedResponseThreats(); - void SetWeaponLockOnTarget(CEntity*); // Static methods static CVector GetLocalPositionToOpenCarDoor(CVehicle *veh, uint32 component, float offset); @@ -1104,6 +1103,16 @@ public: } // -- + inline void SetWeaponLockOnTarget(CEntity *target) + { + if (m_pPointGunAt) + m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt); + + 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) { |