summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.cpp
diff options
context:
space:
mode:
authorJack Powell <jack9267@users.noreply.github.com>2020-08-18 17:47:15 +0200
committerJack Powell <jack9267@users.noreply.github.com>2020-08-18 17:47:15 +0200
commitdb1e5a6ec43246089e5e840b40b189c2c5e37183 (patch)
tree734e9a02090e1b9d9f38970967d444aff25a498a /src/control/Garages.cpp
parentCall CWorld::Remove before the delete, the original game does this and its safer. (diff)
downloadre3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar.gz
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar.bz2
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar.lz
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar.xz
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.tar.zst
re3-db1e5a6ec43246089e5e840b40b189c2c5e37183.zip
Diffstat (limited to 'src/control/Garages.cpp')
-rw-r--r--src/control/Garages.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 1719028b..c9112f81 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -1384,7 +1384,7 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
if (pVehicle->GetPosition().x < m_fX1 || pVehicle->GetPosition().x > m_fX2 ||
pVehicle->GetPosition().y < m_fY1 || pVehicle->GetPosition().y > m_fY2 ||
pVehicle->GetPosition().z < m_fZ1 || pVehicle->GetPosition().z > m_fZ2) {
- if (pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
+ if (!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
CWorld::Remove(pVehicle);
delete pVehicle;
return; // WHY?