Core/Collision: Fixed LoS for doors with data0 = 0 and state = 0

closes #5197

Signed-off-by: Subv <s.v.h21@hotmail.com>
This commit is contained in:
Subv
2012-02-11 21:47:00 -05:00
parent d3a510957e
commit b0bcf1f67c

View File

@@ -132,9 +132,10 @@ 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)*/)
GetMap()->Insert(*m_model);
if (startOpen)
if (startOpen || toggledState)
EnableCollision(false);
WorldObject::AddToWorld();
}