summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-02 10:29:05 +0100
committerGitHub <noreply@github.com>2020-02-02 10:29:05 +0100
commit5fa16fe91a749556e5ecbde900add3f6849cbd1a (patch)
tree2b0e173c5bf5b2541db0b443572d5985525de5b5
parentMerge pull request #315 from Nick007J/master (diff)
parentfix ai bug (2) (diff)
downloadre3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar.gz
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar.bz2
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar.lz
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar.xz
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.tar.zst
re3-5fa16fe91a749556e5ecbde900add3f6849cbd1a.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarAI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index 6032c51f..870a094d 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -501,7 +501,7 @@ void CCarAI::TellCarToRamOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
pTarget->RegisterReference((CEntity**)&pVehicle->AutoPilot.m_pTargetCar);
pVehicle->AutoPilot.m_nCarMission = MISSION_RAMCAR_FARAWAY;
pVehicle->bEngineOn = true;
- pVehicle->AutoPilot.m_nCruiseSpeed = min(6, pVehicle->AutoPilot.m_nCruiseSpeed);
+ pVehicle->AutoPilot.m_nCruiseSpeed = max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
}
void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
@@ -510,7 +510,7 @@ void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
pTarget->RegisterReference((CEntity**)&pVehicle->AutoPilot.m_pTargetCar);
pVehicle->AutoPilot.m_nCarMission = MISSION_BLOCKCAR_FARAWAY;
pVehicle->bEngineOn = true;
- pVehicle->AutoPilot.m_nCruiseSpeed = min(6, pVehicle->AutoPilot.m_nCruiseSpeed);
+ pVehicle->AutoPilot.m_nCruiseSpeed = max(6, pVehicle->AutoPilot.m_nCruiseSpeed);
}
eCarMission CCarAI::FindPoliceCarMissionForWantedLevel()
{