From 6bdfb0d3868e3804484f4abcfda9e56fca92f0e5 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 15 Aug 2021 18:41:59 +0300 Subject: merged correct switch --- src/control/CarAI.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/control/CarAI.cpp') 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++) { -- cgit v1.2.3