summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Garages.cpp2
-rw-r--r--src/control/RoadBlocks.cpp6
-rw-r--r--src/control/Script.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 34ed11eb..b24c9122 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1986,7 +1986,7 @@ void CGarages::GivePlayerDetonator()
float CGarages::FindDoorHeightForMI(int32 mi)
{
- return CModelInfo::GetModelInfo(mi)->GetColModel()->boundingBox.max.z - CModelInfo::GetModelInfo(mi)->GetColModel()->boundingBox.min.z - 0.1f;
+ return CModelInfo::GetColModel(mi)->boundingBox.max.z - CModelInfo::GetColModel(mi)->boundingBox.min.z - 0.1f;
}
void CGarage::TidyUpGarage()
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) {
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 0e403c49..5b5825eb 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -3073,7 +3073,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
CTheScripts::ReadTextLabelFromScript(&m_nIp, label);
int zoneToCheck = CTheZones::FindZoneByLabelAndReturnIndex(label, ZONE_DEFAULT);
if (zoneToCheck != -1)
- m_nIp += KEY_LENGTH_IN_SCRIPT; /* why only if zone != 1? */
+ m_nIp += KEY_LENGTH_IN_SCRIPT; /* why only if zone != -1? */
CVector pos = pPlayer->GetPos();
CZone* pZone = CTheZones::GetNavigationZone(zoneToCheck);
UpdateCompareFlag(CTheZones::PointLiesWithinZone(&pos, pZone));