Fixed the logic on my last commit
This commit is contained in:
1 parent
b0bcf1f67c
commit
a7f6c4f558
1 file changed
+3
-2
@@ -133,10 +133,11 @@ void GameObject::AddToWorld()
|
||||
sObjectAccessor->AddObject(this);
|
||||
bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false);
|
||||
bool toggledState = (GetGOData() ? GetGOData()->go_state == GO_STATE_ACTIVE : false);
|
||||
if (m_model/* && (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? !GetGOInfo()->door.startOpen : true)*/)
|
||||
if (m_model)
|
||||
GetMap()->Insert(*m_model);
|
||||
if (startOpen || toggledState)
|
||||
if ((startOpen && !toggledState) || (!startOpen && toggledState))
|
||||
EnableCollision(false);
|
||||
|
||||
WorldObject::AddToWorld();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user