Fixed the logic on my last commit

This commit is contained in:
Subv
2012-02-12 08:41:59 -05:00
parent b0bcf1f67c
commit a7f6c4f558
@@ -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();
}
}