summaryrefslogtreecommitdiffstats
path: root/src/control/RoadBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/RoadBlocks.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index dee2cbe3..260978b3 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -97,11 +97,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
pCopPed->m_nRoadblockVeh->RegisterReference((CEntity**)&pCopPed->m_nRoadblockVeh);
pCopPed->bCrouchWhenShooting = roadBlockType == 2 ? false : true;
if (pEntityToAttack) {
- if (pCopPed->m_pPointGunAt)
- pCopPed->m_pPointGunAt->CleanUpOldReference(&pCopPed->m_pPointGunAt);
- pCopPed->m_pPointGunAt = pEntityToAttack;
- if (pEntityToAttack)
- pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
+ pCopPed->SetWeaponLockOnTarget(pEntityToAttack);
pCopPed->SetAttack(pEntityToAttack);
}
pCopPed->m_pMyVehicle = pVehicle;