diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-14 08:47:07 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-14 08:47:07 +0100 |
commit | f42a01f653c860b5df3cfdbe34cc37f25dc3c36a (patch) | |
tree | bc6a09f0a1ca0fafbf1e53b4c8e60b581281c0c4 /src/peds/CopPed.cpp | |
parent | Merge branch 'master' of https://github.com/GTAmodding/re3 (diff) | |
download | re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar.gz re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar.bz2 re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar.lz re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar.xz re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.tar.zst re3-f42a01f653c860b5df3cfdbe34cc37f25dc3c36a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/CopPed.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index d9f55559..de7b8ad2 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -69,7 +69,7 @@ CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP) m_bStopAndShootDisabledZone = false; m_bZoneDisabled = false; field_1364 = -1; - m_pPointGunAt = nil; + SetWeaponLockOnTarget(nil); // VC also initializes in here, but as nil #ifdef FIX_BUGS @@ -472,10 +472,7 @@ CCopPed::CopAI(void) if (!CWorld::ProcessLineOfSight(gunPos, playerOrHisVeh->GetPosition(), foundCol, foundEnt, false, true, false, false, true, false, false) || foundEnt && foundEnt == playerOrHisVeh) { - m_pPointGunAt = playerOrHisVeh; - if (playerOrHisVeh) - playerOrHisVeh->RegisterReference((CEntity**) &m_pPointGunAt); - + SetWeaponLockOnTarget(playerOrHisVeh); SetAttack(playerOrHisVeh); SetShootTimer(CGeneral::GetRandomNumberInRange(500, 1000)); } |