summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
committeraap <aap@papnet.eu>2020-12-19 17:27:01 +0100
commit2a51e1da0456e9b7397562102d3241e5c3ddbd6e (patch)
tree308cfd8f4e23e713fec89e041d92ecc96ba462c5 /src/peds/Ped.h
parentanim compression (diff)
parentMerge pull request #891 from Nick007J/miami (diff)
downloadre3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.gz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.bz2
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.lz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.xz
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.zst
re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.zip
Diffstat (limited to 'src/peds/Ped.h')
-rw-r--r--src/peds/Ped.h11
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)
{