summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-06 17:56:38 +0200
committeraap <aap@papnet.eu>2020-05-06 17:56:38 +0200
commitf1c1f56b1268b900a01a479f9ad67cd92e63eb52 (patch)
treef936f78ebcc7b736995b68b4d65a66c26cc790c2 /src/control/CarCtrl.cpp
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.gz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.bz2
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.lz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.xz
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.tar.zst
re3-f1c1f56b1268b900a01a479f9ad67cd92e63eb52.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 6a5d37f3..5dfb73d0 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -354,7 +354,7 @@ CCarCtrl::GenerateOneRandomCar()
pCar->m_bSirenOrAlarm = true;
pCar->AutoPilot.m_nNextPathNodeInfo = connectionId;
pCar->AutoPilot.m_nNextLane = pCar->AutoPilot.m_nCurrentLane = CGeneral::GetRandomNumber() % lanesOnCurrentRoad;
- CColBox* boundingBox = &CModelInfo::GetModelInfo(pCar->GetModelIndex())->GetColModel()->boundingBox;
+ CBox* boundingBox = &CModelInfo::GetModelInfo(pCar->GetModelIndex())->GetColModel()->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. */