Core/GameObject: Implemented NotLOSBlocking door property

(cherry picked from commit 2756ca1c35)
This commit is contained in:
Shauren
2024-07-17 00:21:03 +02:00
committed by Ovahlord
parent e0adab82f8
commit d7a26b3897
4 changed files with 42 additions and 15 deletions
@@ -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<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