Added bug fix to fix mission related crashes

This commit is contained in:
Jack Powell 2020-08-18 17:14:27 +01:00
parent 809c09938a
commit f09abe9ec1
No known key found for this signature in database
GPG Key ID: 3C3DF56965343191

View File

@ -726,6 +726,10 @@ CCarCtrl::RemoveDistantCars()
void void
CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle) CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
{ {
#ifdef FIX_BUGS
if (pVehicle->bIsLocked)
return;
#endif
CVector vecPlayerPos = FindPlayerCentreOfWorld(CWorld::PlayerInFocus); CVector vecPlayerPos = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
/* BUG: this variable is initialized only in if-block below but can be used outside of it. */ /* BUG: this variable is initialized only in if-block below but can be used outside of it. */
if (!IsThisVehicleInteresting(pVehicle) && !pVehicle->bIsLocked && if (!IsThisVehicleInteresting(pVehicle) && !pVehicle->bIsLocked &&