aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-07-17 00:21:03 +0200
committerShauren <shauren.trinity@gmail.com>2024-07-17 00:21:03 +0200
commit2756ca1c350a7545e3a9e848e9b4db9b904f3a14 (patch)
tree3a119d8ad99a372e3e2d6e014dee9d4b1e6a8d55 /src/server
parent4862033a44c3385f7f63725088caf595b30e02a6 (diff)
Core/GameObject: Implemented NotLOSBlocking door property
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 4528293fdfa..a8903ee3c9f 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -3935,7 +3935,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()
@@ -4480,8 +4480,14 @@ void GameObject::HandleCustomTypeCommand(GameObjectTypeBase::CustomCommand const
void GameObject::CreateModel()
{
m_model = GameObjectModel::Create(std::make_unique<GameObjectModelOwnerImpl>(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