diff options
author | aap <aap@papnet.eu> | 2020-05-05 13:02:42 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-05 13:02:42 +0200 |
commit | b44df26d3ea5fcdaf6d954016303f358d2c64b79 (patch) | |
tree | 2921c2c0e2883117f4ce9cec73865c1701f32cec /src/control | |
parent | SetPosition, final part (diff) | |
download | re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar.gz re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar.bz2 re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar.lz re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar.xz re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.tar.zst re3-b44df26d3ea5fcdaf6d954016303f358d2c64b79.zip |
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 | ||||
-rw-r--r-- | src/control/Record.cpp | 3 | ||||
-rw-r--r-- | src/control/Script.h | 3 |
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 }; |