diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-20 16:49:51 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-20 16:49:51 +0200 |
commit | aa104bb0aa3ede08e24358ec80ce1b97baf950e9 (patch) | |
tree | c819a763089d8d79dac13a55779562852f48c3e2 /src | |
parent | A few small audio changes (diff) | |
download | re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar.gz re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar.bz2 re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar.lz re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar.xz re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.tar.zst re3-aa104bb0aa3ede08e24358ec80ce1b97baf950e9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/CarCtrl.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index ca83603f..fe776a38 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -773,14 +773,16 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle) delete pVehicle; return; } - if (pVehicle->GetStatus() != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0) - return; - if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 && - !(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle)) ){ - if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){ - if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){ - CWorld::Remove(pVehicle); - delete pVehicle; + if (pVehicle->GetStatus() == STATUS_WRECKED) { + if (pVehicle->m_nTimeOfDeath != 0) { + if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 && + !(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle))) { + if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)) { + if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())) { + CWorld::Remove(pVehicle); + delete pVehicle; + } + } } } } |