Collision/GameObjects: Corrected a possible logic fail

Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
Subv committed 2012-04-10 20:12:13 -05:00
1 parent e9ac667cce
commit a998e9e58a
1 file changed
+1 -1
@@ -135,7 +135,7 @@ void GameObject::AddToWorld()
sObjectAccessor->AddObject(this);
bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false);
// The state can be changed after GameObject::Create but before GameObject::AddToWorld
bool toggledState = GetGoState() == GO_STATE_READY;
bool toggledState = GetGOData() ? GetGOData()->go_state == GO_STATE_READY : false;
if (m_model)
GetMap()->Insert(*m_model);
if (startOpen ^ toggledState)