summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-02 10:28:23 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-02 10:28:23 +0100
commit76b8e09de54b495cace52bad1513361aabd4df7e (patch)
tree2b0e173c5bf5b2541db0b443572d5985525de5b5 /src/control
parentMerge pull request #315 from Nick007J/master (diff)
downloadre3-76b8e09de54b495cace52bad1513361aabd4df7e.tar
re3-76b8e09de54b495cace52bad1513361aabd4df7e.tar.gz
re3-76b8e09de54b495cace52bad1513361aabd4df7e.tar.bz2
re3-76b8e09de54b495cace52bad1513361aabd4df7e.tar.lz
re3-76b8e09de54b495cace52bad1513361aabd4df7e.tar.xz
re3-76b8e09de54b495cace52bad1513361aabd4df7e.tar.zst
re3-76b8e09de54b495cace52bad1513361aabd4df7e.zip
Diffstat (limited to 'src/control')
-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()
{