mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user