summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-08 00:44:41 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-08 00:51:11 +0200
commit94e9101ce00cf708f3cbccd105c8245912b9fc98 (patch)
treee8a9162418ad0eba8e9b9eb0f34c3bd4d03fd4df /src/control
parentfixes (diff)
downloadre3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar.gz
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar.bz2
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar.lz
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar.xz
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.tar.zst
re3-94e9101ce00cf708f3cbccd105c8245912b9fc98.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/CarCtrl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 59f49a41..8fe7fa29 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -925,7 +925,7 @@ CCarCtrl::RemoveCarsIfThePoolGetsFull(void)
if (CPools::GetVehiclePool()->GetNoOfFreeSpaces() >= 8)
return;
int i = CPools::GetVehiclePool()->GetSize();
- float md = 999999.9f;
+ float md = 10000000.f;
CVehicle* pClosestVehicle = nil;
while (i--) {
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
@@ -2424,7 +2424,13 @@ void CCarCtrl::SteerAICarWithPhysics_OnlyMission(CVehicle* pVehicle, float* pSwe
case MISSION_GOTOCOORDS_ACCURATE:
case MISSION_RAMCAR_FARAWAY:
case MISSION_BLOCKCAR_FARAWAY:
- SteerAICarWithPhysicsFollowPath(pVehicle, pSwerve, pAccel, pBrake, pHandbrake);
+ if (pVehicle->AutoPilot.m_bIgnorePathfinding) {
+ *pSwerve = 0.0f;
+ *pAccel = 1.0f;
+ *pBrake = 0.0f;
+ *pHandbrake = false;
+ }else
+ SteerAICarWithPhysicsFollowPath(pVehicle, pSwerve, pAccel, pBrake, pHandbrake);
return;
case MISSION_RAMPLAYER_CLOSE:
{
@@ -3050,6 +3056,7 @@ bool CCarCtrl::JoinCarWithRoadSystemGotoCoors(CVehicle* pVehicle, CVector vecTar
pVehicle->AutoPilot.m_aPathFindNodesInfo, &pVehicle->AutoPilot.m_nPathFindNodesCount);
if (pVehicle->AutoPilot.m_nPathFindNodesCount < 2){
pVehicle->AutoPilot.m_nPrevRouteNode = pVehicle->AutoPilot.m_nCurrentRouteNode = pVehicle->AutoPilot.m_nNextRouteNode = 0;
+ pVehicle->AutoPilot.m_nPathFindNodesCount = 0;
return true;
}
pVehicle->AutoPilot.m_nPrevRouteNode = 0;