Merge pull request #690 from jack9267/master

Fix small logic mistake in CGarage::RemoveCarsBlockingDoorNotInside
This commit is contained in:
Nikolay Korolev 2020-08-18 18:50:37 +03:00 committed by GitHub
commit 4504b1593e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1384,7 +1384,7 @@ void CGarage::RemoveCarsBlockingDoorNotInside()
if (pVehicle->GetPosition().x < m_fX1 || pVehicle->GetPosition().x > m_fX2 || if (pVehicle->GetPosition().x < m_fX1 || pVehicle->GetPosition().x > m_fX2 ||
pVehicle->GetPosition().y < m_fY1 || pVehicle->GetPosition().y > m_fY2 || pVehicle->GetPosition().y < m_fY1 || pVehicle->GetPosition().y > m_fY2 ||
pVehicle->GetPosition().z < m_fZ1 || pVehicle->GetPosition().z > m_fZ2) { pVehicle->GetPosition().z < m_fZ1 || pVehicle->GetPosition().z > m_fZ2) {
if (pVehicle->bIsLocked && pVehicle->CanBeDeleted()) { if (!pVehicle->bIsLocked && pVehicle->CanBeDeleted()) {
CWorld::Remove(pVehicle); CWorld::Remove(pVehicle);
delete pVehicle; delete pVehicle;
return; // WHY? return; // WHY?