diff --git a/src/game/Entities/GameObject.h b/src/game/Entities/GameObject.h index d29bf3da9a..eaeba1bbe3 100644 --- a/src/game/Entities/GameObject.h +++ b/src/game/Entities/GameObject.h @@ -551,6 +551,16 @@ struct GameObjectInfo default: return false; } } + + bool CanAlwaysBreakLoS() const + { + switch (type) + { + case GAMEOBJECT_TYPE_DOOR: return true; + case GAMEOBJECT_TYPE_GENERIC: return true; + default: return false; + } + } }; // GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform diff --git a/src/game/vmap/GameObjectModel.cpp b/src/game/vmap/GameObjectModel.cpp index 3272693bcd..7daf096edb 100644 --- a/src/game/vmap/GameObjectModel.cpp +++ b/src/game/vmap/GameObjectModel.cpp @@ -93,7 +93,7 @@ bool GameObjectModel::initialize(const GameObject* const pGo, const GameObjectDi if (!iModel) return false; - if (it->second.name.find(".m2") != std::string::npos) + if (!pGo->GetGOInfo()->CanAlwaysBreakLoS() && it->second.name.find(".m2") != std::string::npos) iModel->setModelFlags(VMAP::MOD_M2); name = it->second.name;