summaryrefslogtreecommitdiffstats
path: root/src/peds/CopPed.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-29 17:19:50 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-02 12:21:46 +0100
commitbd8b907d131ac9e5b471a0a31928849b95f5d1f0 (patch)
treeab3102ea352daf603903342baf4aa696d6cacf56 /src/peds/CopPed.cpp
parentsome nasty FIX_BUGS for SLIDE_OBJECT (diff)
downloadre3-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/CopPed.cpp')
-rw-r--r--src/peds/CopPed.cpp13
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
+}