Merge pull request #692 from jack9267/master

Added bug fix to fix mission related crashes
This commit is contained in:
Nikolay Korolev 2020-08-18 19:29:08 +03:00 committed by GitHub
commit 4ffa585cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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