mirror of
https://github.com/rrika/cdcEngineDXHR.git
synced 2024-11-23 05:29:57 +00:00
fix flipped SceneEntity creation condition, non-editor mode should no longer be missing objects
This commit is contained in:
parent
be11579fdf
commit
9e03ab108d
@ -7,6 +7,7 @@
|
||||
namespace cdc {
|
||||
|
||||
SceneEntity::SceneEntity(Scene *scene) : scene(scene) {
|
||||
// called from SceneLayer::AddInstance
|
||||
scene->AddEntity(this);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
dtp::Model **modelsOverride = nullptr; // 5C
|
||||
uint32_t numOverrideModels = 0; // 60
|
||||
cdc::SceneEntity *sceneEntity; // 64
|
||||
cdc::SceneEntity *sceneEntity = nullptr; // 64
|
||||
cdc::Object *derivedObject; // 6C
|
||||
|
||||
// the matrices buffer is allocated by MeshComponent::SetModel
|
||||
|
@ -173,6 +173,10 @@ void InstanceDrawable::RemoveFromDirtyList() { // 2052
|
||||
m_pNextDirty->m_pPrevDirty = m_pPrevDirty;
|
||||
else
|
||||
s_pLastDirty = m_pPrevDirty;
|
||||
|
||||
// HACK
|
||||
m_pNextDirty = nullptr;
|
||||
m_pPrevDirty = nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ static void UpdateInstances() { // 2052
|
||||
while (auto *id = InstanceDrawable::s_pFirstDirty) {
|
||||
Instance *i = id->m_instance;
|
||||
// TODO
|
||||
if (i->sceneEntity)
|
||||
if (!i->sceneEntity)
|
||||
SceneLayer::AddInstance(i);
|
||||
|
||||
// TODO
|
||||
|
Loading…
Reference in New Issue
Block a user