mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-28 14:15:39 +00:00
small refactoring
This commit is contained in:
parent
239367663b
commit
11f2d941f1
1 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue