Fixed the logic on my last commit
This commit is contained in:
@@ -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