summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/CarCtrl.cpp4
-rw-r--r--src/control/Record.cpp3
-rw-r--r--src/control/Script.h3
3 files changed, 8 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index bfa33f27..7e772162 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -696,7 +696,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
if (pVehicle->bExtendedRange)
threshold *= 1.5f;
if (distanceToPlayer > threshold && !CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){
- if (pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle)){
+ if (pVehicle->GetIsOnScreenAndNotCulled()){
pVehicle->bFadeOut = true;
}else{
CWorld::Remove(pVehicle);
@@ -722,7 +722,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
if (pVehicle->GetStatus() != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0)
return;
if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
- (!pVehicle->GetIsOnScreen() || !CRenderer::IsEntityCullZoneVisible(pVehicle))){
+ !pVehicle->GetIsOnScreenAndNotCulled()){
if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){
if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){
CWorld::Remove(pVehicle);
diff --git a/src/control/Record.cpp b/src/control/Record.cpp
index d086543f..6ae99e2c 100644
--- a/src/control/Record.cpp
+++ b/src/control/Record.cpp
@@ -417,8 +417,10 @@ void CRecordDataForChase::GiveUsACar(int32 mi, CVector pos, float angle, CAutomo
*ppCar = pCar;
}
+//--MIAMI: unused
void RemoveUnusedCollision(void)
{
+#ifndef MIAMI
static const char* dontDeleteArray[] = {
"rd_SrRoad2A50", "rd_SrRoad2A20", "rd_CrossRda1w22", "rd_CrossRda1rw22",
"road_broadway02", "road_broadway01", "com_21way5", "com_21way50",
@@ -430,6 +432,7 @@ void RemoveUnusedCollision(void)
CModelInfo::RemoveColModelsFromOtherLevels(LEVEL_NONE);
for (int i = 0; i < ARRAY_SIZE(dontDeleteArray); i++)
CModelInfo::GetModelInfo(dontDeleteArray[i], nil)->GetColModel()->level = LEVEL_COMMERCIAL;
+#endif
}
void CRecordDataForChase::StartChaseScene(float startTime)
diff --git a/src/control/Script.h b/src/control/Script.h
index 01cad269..12a507c1 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -372,6 +372,9 @@ private:
friend class CRunningScript;
friend class CHud;
friend void CMissionCleanup::Process();
+#ifdef MIAMI
+ friend class CColStore;
+#endif
};