diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-11-29 17:19:50 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-02 12:21:46 +0100 |
commit | bd8b907d131ac9e5b471a0a31928849b95f5d1f0 (patch) | |
tree | ab3102ea352daf603903342baf4aa696d6cacf56 /src/peds/Ped.cpp | |
parent | some nasty FIX_BUGS for SLIDE_OBJECT (diff) | |
download | re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar.gz re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar.bz2 re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar.lz re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar.xz re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.tar.zst re3-bd8b907d131ac9e5b471a0a31928849b95f5d1f0.zip |
Diffstat (limited to 'src/peds/Ped.cpp')
-rw-r--r-- | src/peds/Ped.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index acf219b4..cefb3df1 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -9770,6 +9770,17 @@ CPed::Say(uint16 audio, int32 time) } } +void +CPed::SetWeaponLockOnTarget(CEntity *target) +{ + if (m_pPointGunAt) + m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt); + + m_pPointGunAt = (CPed*)target; + if (target) + ((CEntity*)target)->RegisterReference(&m_pPointGunAt); +} + #ifdef COMPATIBLE_SAVES #define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data)); #define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data)); |