summaryrefslogtreecommitdiff
path: root/src/peds/CopPed.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-14 09:47:07 +0200
committerSergeanur <s.anureev@yandex.ua>2020-12-14 09:47:07 +0200
commitf42a01f653c860b5df3cfdbe34cc37f25dc3c36a (patch)
treebc6a09f0a1ca0fafbf1e53b4c8e60b581281c0c4 /src/peds/CopPed.cpp
parentc0652b8203f24a82467c238bc25fbce937957121 (diff)
CPed::SetWeaponLockOnTarget
Diffstat (limited to 'src/peds/CopPed.cpp')
-rw-r--r--src/peds/CopPed.cpp7
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));
}