summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/FileLoader.cpp4
-rw-r--r--src/entities/Solid.h6
-rw-r--r--src/modelinfo/MloModelInfo.cpp4
-rw-r--r--src/modelinfo/ModelInfo.cpp4
-rw-r--r--src/modelinfo/ModelInfo.h2
-rw-r--r--src/vehicles/Plane.cpp2
6 files changed, 10 insertions, 12 deletions
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 50f51ecb..8fb4b4d9 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -656,7 +656,7 @@ CFileLoader::LoadMLO(const char *line)
CMloModelInfo *minfo = CModelInfo::AddMloModel(modelIndex);
minfo->SetName(name);
minfo->field_34 = someFloat;
- int instId = CModelInfo::GetMloInstanceStore()->allocPtr;
+ int instId = CModelInfo::GetMloInstanceStore().allocPtr;
minfo->firstInstance = instId;
minfo->lastInstance = instId;
minfo->SetTexDictionary("generic");
@@ -680,7 +680,7 @@ CFileLoader::LoadMLOInstance(int id, const char *line)
&rot.x, &rot.y, &rot.z,
&angle);
float rad = 2.0f * (PI / 2.0f - Atan2(angle, Sqrt(1.0f - SQR(angle))));
- CInstance *inst = CModelInfo::GetMloInstanceStore()->alloc();
+ CInstance *inst = CModelInfo::GetMloInstanceStore().alloc();
minfo->lastInstance++;
RwMatrix *matrix = RwMatrixCreate();
diff --git a/src/entities/Solid.h b/src/entities/Solid.h
index f4679b3b..e67c8e29 100644
--- a/src/entities/Solid.h
+++ b/src/entities/Solid.h
@@ -6,9 +6,7 @@ class CSolid : public CEntity
{
public:
CSolid(void) {
- bRemoveFromWorld = true;
- bHasHitWall = false;
- bImBeingRendered = false;
- m_flagE2 = true;
+ m_type = ENTITY_TYPE_BUILDING;
+ bUsesCollision = true;
}
}; \ No newline at end of file
diff --git a/src/modelinfo/MloModelInfo.cpp b/src/modelinfo/MloModelInfo.cpp
index 693f1fb6..746d9db4 100644
--- a/src/modelinfo/MloModelInfo.cpp
+++ b/src/modelinfo/MloModelInfo.cpp
@@ -12,8 +12,8 @@ CMloModelInfo::ConstructClump()
RpClumpSetFrame(m_clump, mainFrame);
for (int i = firstInstance; i < lastInstance; i++) {
- int modelId = CModelInfo::GetMloInstanceStore()->store[i].m_modelIndex;
- RwMatrix *attMat = CModelInfo::GetMloInstanceStore()->store[i].GetMatrix().m_attachment;
+ int modelId = CModelInfo::GetMloInstanceStore().store[i].m_modelIndex;
+ RwMatrix *attMat = CModelInfo::GetMloInstanceStore().store[i].GetMatrix().m_attachment;
CSimpleModelInfo *minfo = (CSimpleModelInfo*)CModelInfo::GetModelInfo(modelId);
if (minfo->m_atomics[0] != nil) {
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index c41320e2..a3c1412d 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -218,10 +218,10 @@ CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level)
}
}
-CStore<CInstance, MLOINSTANCESIZE>*
+CStore<CInstance, MLOINSTANCESIZE>&
CModelInfo::GetMloInstanceStore()
{
- return &CModelInfo::ms_mloInstanceStore;
+ return CModelInfo::ms_mloInstanceStore;
}
void
diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h
index 3835117e..13756ddf 100644
--- a/src/modelinfo/ModelInfo.h
+++ b/src/modelinfo/ModelInfo.h
@@ -36,6 +36,7 @@ public:
static CVehicleModelInfo *AddVehicleModel(int id);
static CStore<C2dEffect, TWODFXSIZE> &Get2dEffectStore(void) { return ms_2dEffectStore; }
+ static CStore<CInstance, MLOINSTANCESIZE> &GetMloInstanceStore();
static CBaseModelInfo *GetModelInfo(const char *name, int *id);
static CBaseModelInfo *GetModelInfo(int id){
@@ -45,6 +46,5 @@ public:
static bool IsBoatModel(int32 id);
static bool IsBikeModel(int32 id);
static void RemoveColModelsFromOtherLevels(eLevelName level);
- static CStore<CInstance, MLOINSTANCESIZE>* CModelInfo::GetMloInstanceStore();
static void ConstructMloClumps();
};
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index 29affdcb..cfe33556 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -959,7 +959,7 @@ CPlane::CreateDropOffCesna(void)
}
CVector CPlane::FindDrugPlaneCoordinates(void) { return pDrugRunCesna->GetPosition(); }
-CVector CPlane::FindDropOffCesnaCoordinates(void) { return pDrugRunCesna->GetPosition(); }
+CVector CPlane::FindDropOffCesnaCoordinates(void) { return pDropOffCesna->GetPosition(); }
bool CPlane::HasCesnaLanded(void) { return CesnaMissionStatus == CESNA_STATUS_LANDED; }
bool CPlane::HasCesnaBeenDestroyed(void) { return CesnaMissionStatus == CESNA_STATUS_DESTROYED; }
bool CPlane::HasDropOffCesnaBeenShotDown(void) { return DropOffCesnaMissionStatus == CESNA_STATUS_DESTROYED; }