diff options
Diffstat (limited to '')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 | ||||
-rw-r--r-- | src/control/PathFind.cpp | 11 | ||||
-rw-r--r-- | src/control/PathFind.h | 2 | ||||
-rw-r--r-- | src/control/Phones.cpp | 2 | ||||
-rw-r--r-- | src/control/Pickups.cpp | 2 | ||||
-rw-r--r-- | src/control/Record.cpp | 3 | ||||
-rw-r--r-- | src/control/SceneEdit.cpp | 5 | ||||
-rw-r--r-- | src/control/Script.cpp | 2 | ||||
-rw-r--r-- | src/control/Script.h | 3 |
9 files changed, 19 insertions, 15 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index 809e6f90..927a0070 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/PathFind.cpp b/src/control/PathFind.cpp index 86314d36..b8203821 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -661,8 +661,7 @@ CPathFind::CountFloodFillGroups(uint8 type) if(type == PATH_CAR) #ifndef MIAMI printf("Single car node: %f %f %f (%d)\n", - node->GetX(), node->GetY(), node->GetZ(), - m_mapObjects[node->objectIndex]->m_modelIndex); + node->GetX(), node->GetY(), node->GetZ(), m_mapObjects[node->objectIndex]->GetModelIndex()); #else printf("Single car node: %f %f %f\n", node->GetX(), node->GetY(), node->GetZ()); @@ -737,7 +736,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor // Calculate internal nodes, store them and connect them to defining object for(i = 0; i < m_numMapObjects; i++){ tileStart = m_numPathNodes; - start = 12*m_mapObjects[i]->m_modelIndex; + start = 12 * m_mapObjects[i]->GetModelIndex(); for(j = 0; j < 12; j++){ if(objectpathinfo[start + j].type == NodeTypeIntern){ CalcNodeCoors( @@ -826,7 +825,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor TempListLength = 0; #ifndef MIAMI for(i = 0; i < m_numMapObjects; i++){ - start = 12*m_mapObjects[i]->m_modelIndex; + start = 12 * m_mapObjects[i]->GetModelIndex(); for(j = 0; j < 12; j++){ if(objectpathinfo[start + j].type != NodeTypeExtern) continue; @@ -1056,7 +1055,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor iseg++; #ifndef MIAMI - istart = 12*m_mapObjects[m_pathNodes[i].objectIndex]->m_modelIndex; + istart = 12 * m_mapObjects[m_pathNodes[i].objectIndex]->GetModelIndex(); #endif // Add links to other internal nodes for(j = Max(oldNumPathNodes, i-12); j < Min(m_numPathNodes, i+12); j++){ @@ -1066,7 +1065,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor jseg = j-i + iseg; #ifndef MIAMI - jstart = 12*m_mapObjects[m_pathNodes[j].objectIndex]->m_modelIndex; + jstart = 12 * m_mapObjects[m_pathNodes[j].objectIndex]->GetModelIndex(); if(objectpathinfo[istart + iseg].next == jseg || objectpathinfo[jstart + jseg].next == iseg){ #else diff --git a/src/control/PathFind.h b/src/control/PathFind.h index a4bb02a2..d2799f87 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -138,7 +138,7 @@ struct CCarPathLink int16 pathNodeIndex; int8 numLeftLanes; int8 numRightLanes; - int8 trafficLightType; + uint8 trafficLightType; uint8 bBridgeLights : 1; // more? diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp index 27bdc010..136ef7db 100644 --- a/src/control/Phones.cpp +++ b/src/control/Phones.cpp @@ -298,7 +298,7 @@ CPhoneInfo::Initialise(void) for (int i = pool->GetSize() - 1; i >= 0; i--) { CBuilding *building = pool->GetSlot(i); if (building) { - if (building->m_modelIndex == MI_PHONEBOOTH1) { + if (building->GetModelIndex() == MI_PHONEBOOTH1) { CPhone *maxPhone = &m_aPhones[m_nMax]; maxPhone->m_nState = PHONE_STATE_FREE; maxPhone->m_vecPos = building->GetPosition(); diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index bc1bbf1c..6b56cd8f 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -229,7 +229,7 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId) if (m_eType == PICKUP_ON_STREET) { m_nTimer = CTimer::GetTimeInMilliseconds() + 30000; } else if (m_eType == PICKUP_ON_STREET_SLOW) { - if (MI_PICKUP_BRIBE == m_pObject->m_modelIndex) + if (MI_PICKUP_BRIBE == m_pObject->GetModelIndex()) m_nTimer = CTimer::GetTimeInMilliseconds() + 300000; else m_nTimer = CTimer::GetTimeInMilliseconds() + 720000; 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/SceneEdit.cpp b/src/control/SceneEdit.cpp index cf6cc4f6..c8b4242e 100644 --- a/src/control/SceneEdit.cpp +++ b/src/control/SceneEdit.cpp @@ -84,12 +84,11 @@ static int32 NextValidModelId(int32 mi, int32 step) CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo; if (!pInfo) continue; - if (pInfo->m_type == MITYPE_PED + if (pInfo->GetModelType() == MITYPE_PED #ifdef FIX_BUGS && !(i >= MI_SPECIAL01 && i <= MI_SPECIAL04) #endif - || - pInfo->m_type == MITYPE_VEHICLE && + || pInfo->GetModelType() == MITYPE_VEHICLE && #ifdef FIX_BUGS (pVehicleInfo->m_vehicleType == VEHICLE_TYPE_CAR || pVehicleInfo->m_vehicleType == VEHICLE_TYPE_BOAT)) #else // && and || priority failure it seems, also crashes on special models diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 7906b3e7..2bb945d3 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -8074,7 +8074,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command) continue; // desperatly want to believe this was inlined :| CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model); - assert(pInfo->m_type == MITYPE_VEHICLE); + assert(pInfo->GetModelType() == MITYPE_VEHICLE); CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo; if (pVehicleInfo->m_vehicleType != VEHICLE_TYPE_CAR) { switch (model) { 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 }; |