summaryrefslogtreecommitdiffstats
path: root/src/control/RoadBlocks.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-09 17:14:19 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-09 17:14:19 +0200
commit1f98f01dcb006783755bd58fa458bb515626b2dd (patch)
treea9c26a33b0ae98f19c48a151ae5910422e18816f /src/control/RoadBlocks.cpp
parentAdd sprite to the waypoint marker (diff)
downloadre3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar.gz
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar.bz2
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar.lz
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar.xz
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.tar.zst
re3-1f98f01dcb006783755bd58fa458bb515626b2dd.zip
Diffstat (limited to '')
-rw-r--r--src/control/RoadBlocks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index c22bebaa..4c3307c5 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -51,7 +51,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
CEntity* pEntityToAttack = (CEntity*)FindPlayerVehicle();
if (!pEntityToAttack)
pEntityToAttack = (CEntity*)FindPlayerPed();
- CColModel* pPoliceColModel = CModelInfo::GetModelInfo(MI_POLICE)->GetColModel();
+ CColModel* pPoliceColModel = CModelInfo::GetColModel(MI_POLICE);
float fRadius = pVehicle->GetBoundRadius() / pPoliceColModel->boundingSphere.radius;
for (int32 i = 0; i < 2; i++) {
const int32 roadBlockIndex = i + 2 * roadBlockType;
@@ -130,7 +130,7 @@ CRoadBlocks::GenerateRoadBlocks(void)
vehicleId = MI_ENFORCER;
if (!CStreaming::HasModelLoaded(vehicleId))
vehicleId = MI_POLICE;
- CColModel *pVehicleColModel = CModelInfo::GetModelInfo(vehicleId)->GetColModel();
+ CColModel *pVehicleColModel = CModelInfo::GetColModel(vehicleId);
float fModelRadius = 2.0f * pVehicleColModel->boundingSphere.radius + 0.25f;
int16 radius = (int16)(fMapObjectRadius / fModelRadius);
if (radius >= 6)
@@ -152,7 +152,7 @@ CRoadBlocks::GenerateRoadBlocks(void)
else
offsetMatrix.GetPosition() = CVector(i * fModelRadius - fOffset, 0.0f, 0.6f);
CMatrix vehicleMatrix = mapObject->GetMatrix() * offsetMatrix;
- float fModelRadius = CModelInfo::GetModelInfo(vehicleId)->GetColModel()->boundingSphere.radius - 0.25f;
+ float fModelRadius = CModelInfo::GetColModel(vehicleId)->boundingSphere.radius - 0.25f;
int16 colliding = 0;
CWorld::FindObjectsKindaColliding(vehicleMatrix.GetPosition(), fModelRadius, 0, &colliding, 2, nil, false, true, true, false, false);
if (!colliding) {