From 8cc3f867a6446c2275d985599b639bb9c665f16b Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 24 Dec 2020 17:44:59 +0300 Subject: fixed double explosion --- src/peds/Ped.cpp | 2 ++ src/vehicles/Vehicle.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index ec56861e..b5ab2f21 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -4246,7 +4246,9 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg) veh->m_nGettingOutFlags &= ~GetCarDoorFlag(ped->m_vehEnterType); if (veh->pDriver == ped) { veh->RemoveDriver(); +#ifndef FIX_BUGS // RemoveDriver does it anyway veh->SetStatus(STATUS_ABANDONED); +#endif if (veh->m_nDoorLock == CARLOCK_LOCKED_INITIALLY) veh->m_nDoorLock = CARLOCK_UNLOCKED; if (ped->m_nPedType == PEDTYPE_COP && veh->IsLawEnforcementVehicle()) diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 9adcf148..ba9348f0 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -1171,7 +1171,10 @@ CVehicle::AddPassenger(CPed *passenger, uint8 n) void CVehicle::RemoveDriver(void) { - SetStatus(STATUS_ABANDONED); +#ifdef FIX_BUGS + if (GetStatus() != STATUS_WRECKED) +#endif + SetStatus(STATUS_ABANDONED); pDriver = nil; } -- cgit v1.2.3