summaryrefslogtreecommitdiffstats
path: root/src/control/RoadBlocks.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-11 07:35:01 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-11 07:35:01 +0200
commitd7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8 (patch)
tree6e30f138b2ca1cdc015a30205063b8c18cbc8cb0 /src/control/RoadBlocks.cpp
parentAdd sprite to the waypoint marker (diff)
downloadre3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar.gz
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar.bz2
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar.lz
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar.xz
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.tar.zst
re3-d7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8.zip
Diffstat (limited to 'src/control/RoadBlocks.cpp')
-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 46eee71f..02afb7d8 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -60,7 +60,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;
@@ -217,7 +217,7 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2)
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 numRoadblockVehicles = Min(6, (int16)(distBetween / fModelRadius));
for (int16 i = 0; i < numRoadblockVehicles; i++) {
@@ -231,7 +231,7 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2)
tmp.RotateZ(((CGeneral::GetRandomNumber() & 0xFF) - 128.0f) * 0.003f + 3.1416f);
tmp.SetTranslateOnly(offset * forward + pos);
tmp.GetPosition().z += 0.6f;
- float fModelRadius = CModelInfo::GetModelInfo(vehicleId)->GetColModel()->boundingSphere.radius - 0.25f;
+ float fModelRadius = CModelInfo::GetColModel(vehicleId)->boundingSphere.radius - 0.25f;
int16 colliding = 0;
CWorld::FindObjectsKindaColliding(tmp.GetPosition(), fModelRadius, 0, &colliding, 2, nil, false, true, true, false, false);
if (!colliding) {