diff options
Diffstat (limited to '')
-rw-r--r-- | src/entities/Entity.cpp | 8 | ||||
-rw-r--r-- | src/entities/Entity.h | 8 | ||||
-rw-r--r-- | src/entities/Physical.cpp | 2 | ||||
-rw-r--r-- | src/entities/Treadable.h | 4 |
4 files changed, 22 insertions, 0 deletions
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 7bacd421..955f32a8 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -52,6 +52,9 @@ CEntity::CEntity(void) bRenderScorched = false; bHasBlip = false; bIsBIGBuilding = false; +#ifdef MIAMI + bStreamBIGBuilding = false; +#endif bRenderDamaged = false; bBulletProof = false; @@ -345,6 +348,11 @@ CEntity::SetupBigBuilding(void) bStreamingDontDelete = true; bUsesCollision = false; m_level = CTheZones::GetLevelFromPosition(GetPosition()); +#ifdef MIAMI + if(mi->m_lodDistances[0] <= 2000.0f) + bStreamBIGBuilding = true; + // TODO: the stuff down there isn't right yet +#endif if(m_level == LEVEL_NONE){ if(mi->GetTxdSlot() != CTxdStore::FindTxdSlot("generic")){ mi->SetTexDictionary("generic"); diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 17353f97..49c6932c 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -59,6 +59,9 @@ public: uint32 bRenderScorched : 1; uint32 bHasBlip : 1; uint32 bIsBIGBuilding : 1; // Set if this entity is a big building +#ifdef MIAMI + uint32 bStreamBIGBuilding : 1; // set when draw dist <= 2000 +#endif uint32 bRenderDamaged : 1; // use damaged LOD models for objects with applicable damage // flagsC @@ -90,7 +93,12 @@ public: uint16 m_scanCode; uint16 m_randomSeed; int16 m_modelIndex; +#ifndef MIAMI uint16 m_level; // int16 +#else + int8 m_level; + int8 m_area; +#endif CReference *m_pFirstReference; public: diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index dd49ea3e..a61aaa78 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -267,6 +267,7 @@ void CPhysical::AddCollisionRecord_Treadable(CEntity *ent) { if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable()){ +#ifndef MIAMI CTreadable *t = (CTreadable*)ent; if(t->m_nodeIndices[PATH_PED][0] >= 0 || t->m_nodeIndices[PATH_PED][1] >= 0 || @@ -278,6 +279,7 @@ CPhysical::AddCollisionRecord_Treadable(CEntity *ent) t->m_nodeIndices[PATH_CAR][2] >= 0 || t->m_nodeIndices[PATH_CAR][3] >= 0) m_treadable[PATH_CAR] = t; +#endif } } diff --git a/src/entities/Treadable.h b/src/entities/Treadable.h index 9e4de59a..78f69c8a 100644 --- a/src/entities/Treadable.h +++ b/src/entities/Treadable.h @@ -8,8 +8,12 @@ public: static void *operator new(size_t); static void operator delete(void*, size_t); +#ifndef MIAMI int16 m_nodeIndices[2][12]; // first car, then ped +#endif bool GetIsATreadable(void) { return true; } }; +#ifndef MIAMI static_assert(sizeof(CTreadable) == 0x94, "CTreadable: error"); +#endif |