summaryrefslogtreecommitdiffstats
path: root/src/control/CarAI.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-15 17:41:59 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-15 17:41:59 +0200
commit6bdfb0d3868e3804484f4abcfda9e56fca92f0e5 (patch)
treef839f1745706c83a88b419e01a747f407b8e0e72 /src/control/CarAI.cpp
parentbruh (diff)
downloadre3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar.gz
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar.bz2
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar.lz
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar.xz
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.tar.zst
re3-6bdfb0d3868e3804484f4abcfda9e56fca92f0e5.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarAI.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index ff793374..c8230d4d 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -611,8 +611,18 @@ void CCarAI::TellOccupantsToFleeCar(CVehicle* pVehicle)
{
if (pVehicle->pDriver && !pVehicle->pDriver->IsPlayer()) {
pVehicle->pDriver->SetObjective(OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE);
- if (pVehicle->GetModelIndex() != MI_FIRETRUCK && pVehicle->GetModelIndex() == MI_AMBULAN)
+ switch (pVehicle->GetModelIndex()) {
+ case MI_FIRETRUCK:
+ case MI_FBIRANCH:
+ case MI_ENFORCER:
+ case MI_BARRACKS:
+ case MI_RHINO:
+ case MI_POLICE:
+ break;
+ case MI_AMBULAN:
pVehicle->pDriver->Say(SOUND_PED_LEAVE_VEHICLE);
+ break;
+ }
}
int timer = 100;
for (int i = 0; i < pVehicle->m_nNumMaxPassengers; i++) {