summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-20 16:49:51 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-20 16:54:42 +0200
commit11f2d941f1ca4168bd4eaa01372ac695c70a1488 (patch)
tree5eeb1441b429c450ed12aad916ce884e9f2f0f5a
parentRename unknown audio field (diff)
downloadre3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar.gz
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar.bz2
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar.lz
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar.xz
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.tar.zst
re3-11f2d941f1ca4168bd4eaa01372ac695c70a1488.zip
-rw-r--r--src/control/CarCtrl.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index fa5ac1fe..df50f224 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -1012,14 +1012,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;
+ }
+ }
}
}
}