summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Entity.cpp2
-rw-r--r--src/entities/Entity.h3
-rw-r--r--src/entities/Physical.cpp3
3 files changed, 6 insertions, 2 deletions
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp
index 6c7a628e..e3ecf50f 100644
--- a/src/entities/Entity.cpp
+++ b/src/entities/Entity.cpp
@@ -74,6 +74,8 @@ CEntity::CEntity(void)
bDistanceFade = false;
m_flagE2 = false;
+ bIsStaticWaitingForCollision = false;
+
m_scanCode = 0;
m_modelIndex = -1;
m_rwObject = nil;
diff --git a/src/entities/Entity.h b/src/entities/Entity.h
index aecb1bc0..e85e40f7 100644
--- a/src/entities/Entity.h
+++ b/src/entities/Entity.h
@@ -84,6 +84,7 @@ public:
// flagsE
uint32 m_flagE2 : 1;
// TODO(MIAMI)
+ uint32 bIsStaticWaitingForCollision : 1; // this is used by script created entities - they are static until the collision is loaded below them
uint16 m_scanCode;
uint16 m_randomSeed;
@@ -98,7 +99,7 @@ public:
eEntityStatus GetStatus() const { return (eEntityStatus)m_status; }
void SetStatus(eEntityStatus status) { m_status = status; }
CColModel *GetColModel(void) { return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); }
- bool IsStatic(void) { return bIsStatic; }
+ bool IsStatic(void) { return bIsStatic || bIsStaticWaitingForCollision; }
#ifdef COMPATIBLE_SAVES
void SaveEntityFlags(uint8*& buf);
void LoadEntityFlags(uint8*& buf);
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index bbe69167..987cc293 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -218,7 +218,8 @@ CPhysical::GetBoundRect(void)
void
CPhysical::AddToMovingList(void)
{
- m_movingListNode = CWorld::GetMovingEntityList().InsertItem(this);
+ if (!bIsStaticWaitingForCollision)
+ m_movingListNode = CWorld::GetMovingEntityList().InsertItem(this);
}
void