summaryrefslogtreecommitdiff
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-11 08:42:26 +0300
committerSergeanur <s.anureev@yandex.ua>2021-08-11 08:42:26 +0300
commit463fdab6a48502b0610f944b9de0853edef3615e (patch)
tree9abd57333f1d3c526f9b4801a7c792b39096d10e /src/control
parentd7a28c4d2b80a82646f15b4fdbce7a26aeb2eaa8 (diff)
Fix a bunch of CModelInfo::GetModelInfo->GetColModel calls, part 2
Diffstat (limited to 'src/control')
-rw-r--r--src/control/CarCtrl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 6e1b5f21..1cf09a9f 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -400,7 +400,7 @@ CCarCtrl::GenerateOneRandomCar()
pVehicle->m_bSirenOrAlarm = true;
pVehicle->AutoPilot.m_nNextPathNodeInfo = connectionId;
pVehicle->AutoPilot.m_nNextLane = pVehicle->AutoPilot.m_nCurrentLane = CGeneral::GetRandomNumber() % lanesOnCurrentRoad;
- CBox* boundingBox = &CModelInfo::GetModelInfo(pVehicle->GetModelIndex())->GetColModel()->boundingBox;
+ CBox* boundingBox = &CModelInfo::GetColModel(pVehicle->GetModelIndex())->boundingBox;
float carLength = 1.0f + (boundingBox->max.y - boundingBox->min.y) / 2;
float distanceBetweenNodes = (pCurNode->GetPosition() - pNextNode->GetPosition()).Magnitude2D();
/* If car is so long that it doesn't fit between two car nodes, place it directly in the middle. */