summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/Garages.cpp')
-rw-r--r--src/control/Garages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index e7b5ebe6..9aba431c 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1324,7 +1324,7 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
if (!IsEntityTouching3D(pVehicle))
continue;
if (!IsPointInsideGarage(pVehicle->GetPosition())) {
- if (pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
+ if (!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
CWorld::Remove(pVehicle);
delete pVehicle;
return; // WHY?
@@ -1817,8 +1817,9 @@ CVehicle* CStoredCar::RestoreCar()
pVehicle->m_nRadioStation = m_nRadioStation;
pVehicle->bFreebies = false;
#ifdef FIX_BUGS
- ((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
+ if (pVehicle->IsCar())
#endif
+ ((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
pVehicle->bHasBeenOwnedByPlayer = true;
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
pVehicle->bBulletProof = m_bBulletproof;