summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-16 10:48:28 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-16 10:48:28 +0100
commited5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf (patch)
treea566f4b1ac8ac55d2b00ec6fa750ef743708bc3d /src/control
parentlcs car ctrl 1 (diff)
parentsmall fix of fix (diff)
downloadre3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar.gz
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar.bz2
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar.lz
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar.xz
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.tar.zst
re3-ed5a9d5dc1b0b6d96f866ae11d1d6871d615a7bf.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/CarCtrl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 93e9aa44..2af218c4 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2148,8 +2148,9 @@ bool CCarCtrl::PickNextNodeToFollowPath(CVehicle* pVehicle)
pVehicle->AutoPilot.m_vecDestinationCoors, pVehicle->AutoPilot.m_aPathFindNodesInfo,
&pVehicle->AutoPilot.m_nPathFindNodesCount, NUM_PATH_NODES_IN_AUTOPILOT,
pVehicle, nil, 999999.9f, -1);
- if (pVehicle->AutoPilot.m_nPathFindNodesCount < 1)
+ if (pVehicle->AutoPilot.m_nPathFindNodesCount < 2)
return true;
+ pVehicle->AutoPilot.RemoveOnePathNode();
}
CPathNode* pNextPathNode = &ThePaths.m_pathNodes[pVehicle->AutoPilot.m_nNextRouteNode];
CCarPathLink* pCurLink = &ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nNextPathNodeInfo];