diff options
author | erorcun <erayorcunus@gmail.com> | 2020-12-02 12:35:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 12:35:06 +0100 |
commit | 774aa1570fc4985b1a713b5979ffe16719a991c0 (patch) | |
tree | cd49718c4ab2a9f3c899b7e6627055faa4b14406 /src/peds/Ped.cpp | |
parent | cam lod dist fix (diff) | |
parent | PlayerPed and "Redefine controls" menu done, fixes (diff) | |
download | re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.gz re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.bz2 re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.lz re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.xz re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.zst re3-774aa1570fc4985b1a713b5979ffe16719a991c0.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 5791b0ae..3df45145 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)); |