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/CopPed.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/CopPed.cpp')
-rw-r--r-- | src/peds/CopPed.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 10490a69..33b44d3e 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -96,9 +96,7 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP) field_61C = 0; field_624 = 0; m_pStinger = new CStinger; - if (m_pPointGunAt) - m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt); - m_pPointGunAt = nil; + SetWeaponLockOnTarget(nil); } CCopPed::~CCopPed() @@ -493,12 +491,7 @@ CCopPed::CopAI(void) false, true, false, false, true, false, false) || foundEnt && foundEnt == playerOrHisVeh) { - if (m_pPointGunAt) - m_pPointGunAt->CleanUpOldReference((CEntity**) &m_pPointGunAt); - m_pPointGunAt = playerOrHisVeh; - if (playerOrHisVeh) - playerOrHisVeh->RegisterReference((CEntity**) &m_pPointGunAt); - + SetWeaponLockOnTarget(playerOrHisVeh); SetAttack(playerOrHisVeh); SetShootTimer(CGeneral::GetRandomNumberInRange(500, 1000)); } @@ -880,4 +873,4 @@ CCopPed::ProcessStingerCop(void) } else { ClearPursuit(); } -}
\ No newline at end of file +} |