From d7a26b3897f30cb65ac49f74bfb29677def01057 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 17 Jul 2024 00:21:03 +0200 Subject: Core/GameObject: Implemented NotLOSBlocking door property (cherry picked from commit 2756ca1c350a7545e3a9e848e9b4db9b904f3a14) --- src/server/game/Entities/GameObject/GameObject.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index e249928f70c..feb5b263b05 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -3882,7 +3882,7 @@ void GameObject::EnableCollision(bool enable) /*if (enable && !GetMap()->ContainsGameObjectModel(*m_model)) GetMap()->InsertGameObjectModel(*m_model);*/ - m_model->enableCollision(enable); + m_model->EnableCollision(enable); } void GameObject::UpdateModel() @@ -4427,8 +4427,14 @@ void GameObject::HandleCustomTypeCommand(GameObjectTypeBase::CustomCommand const void GameObject::CreateModel() { m_model = GameObjectModel::Create(std::make_unique(this), sWorld->GetDataPath()); - if (m_model && m_model->isMapObject()) - SetFlag(GO_FLAG_MAP_OBJECT); + if (m_model) + { + if (m_model->IsMapObject()) + SetFlag(GO_FLAG_MAP_OBJECT); + + if (GetGoType() == GAMEOBJECT_TYPE_DOOR) + m_model->DisableLosBlocking(GetGOInfo()->door.NotLOSBlocking); + } } std::string GameObject::GetDebugInfo() const -- cgit v1.2.3