aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-02-11 21:47:00 -0500
committerSubv <s.v.h21@hotmail.com>2012-02-11 21:47:00 -0500
commitb0bcf1f67caee3adac49d46ddb00af986e6e27cd (patch)
tree7888e44ebadfa11c1c6c5024aef6cafa34355298
parentd3a510957ec14f7f88951a73453f93a9b1e1a90e (diff)
Core/Collision: Fixed LoS for doors with data0 = 0 and state = 0
closes #5197 Signed-off-by: Subv <s.v.h21@hotmail.com>
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 040bd8b70dd..1dd84a08607 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -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();
}