mirror of
https://github.com/halpz/re3.git
synced 2024-12-22 17:35:29 +00:00
small refactoring
This commit is contained in:
parent
ef0b5f857d
commit
aa104bb0aa
|
@ -773,14 +773,16 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
||||||
delete pVehicle;
|
delete pVehicle;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pVehicle->GetStatus() != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0)
|
if (pVehicle->GetStatus() == STATUS_WRECKED) {
|
||||||
return;
|
if (pVehicle->m_nTimeOfDeath != 0) {
|
||||||
if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
|
if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
|
||||||
!(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle)) ){
|
!(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle))) {
|
||||||
if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){
|
if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)) {
|
||||||
if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){
|
if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())) {
|
||||||
CWorld::Remove(pVehicle);
|
CWorld::Remove(pVehicle);
|
||||||
delete pVehicle;
|
delete pVehicle;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue