summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-11 08:36:58 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-11 08:36:58 +0200
commit2c79080e1b16cb794b33e24508c11ab4fc259b48 (patch)
tree9f602753c501bd1524179753beeb52771f43e924 /src/control/CarCtrl.cpp
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
parentMerge branch 'master' into miami (diff)
downloadre3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar.gz
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar.bz2
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar.lz
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar.xz
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.tar.zst
re3-2c79080e1b16cb794b33e24508c11ab4fc259b48.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 0221a5eb..026a2057 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -427,7 +427,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. */