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:56:48 +0200 |
commit | 811729ab41c5466c5ccd898d848dd5d94be2039e (patch) | |
tree | 3f441b755c09cad540a5e7c6063cfdf8b2e1daf6 /src/control/CarCtrl.cpp | |
parent | Merge branch 'miami' into lcs (diff) | |
download | re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar.gz re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar.bz2 re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar.lz re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar.xz re3-811729ab41c5466c5ccd898d848dd5d94be2039e.tar.zst re3-811729ab41c5466c5ccd898d848dd5d94be2039e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/CarCtrl.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index 927ee148..c65ec71f 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -1086,14 +1086,17 @@ 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()){ - 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 && + CTimer::GetTimeInMilliseconds() > pVehicle->m_nSetPieceExtendedRangeTime && + !(pVehicle->GetIsOnScreen())) { + if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(6.5f)) { + if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())) { + CWorld::Remove(pVehicle); + delete pVehicle; + } + } } } } |