summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.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/CarCtrl.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 'src/control/CarCtrl.cpp')
-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 37312b89..ca83603f 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -354,7 +354,7 @@ CCarCtrl::GenerateOneRandomCar()
pVehicle->m_bSirenOrAlarm = true;
pVehicle->AutoPilot.m_nNextPathNodeInfo = connectionId;
pVehicle->AutoPilot.m_nNextLane = pVehicle->AutoPilot.m_nCurrentLane = CGeneral::GetRandomNumber() % lanesOnCurrentRoad;
- CColBox* boundingBox = &CModelInfo::GetModelInfo(pVehicle->GetModelIndex())->GetColModel()->boundingBox;
+ CColBox* 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. */