mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-28 14:55:40 +00:00
small refactoring
This commit is contained in:
parent
239367663b
commit
11f2d941f1
1 changed files with 11 additions and 8 deletions
|
@ -1012,17 +1012,20 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
|||
delete pVehicle;
|
||||
return;
|
||||
}
|
||||
if (pVehicle->GetStatus() != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0)
|
||||
return;
|
||||
if (pVehicle->GetStatus() == STATUS_WRECKED) {
|
||||
if (pVehicle->m_nTimeOfDeath != 0) {
|
||||
if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
|
||||
!pVehicle->GetIsOnScreen()){
|
||||
if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){
|
||||
if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32
|
||||
|
|
Loading…
Reference in a new issue