diff --git a/apps/openmw/mwlua/object.cpp b/apps/openmw/mwlua/object.cpp index 9b51729b10..9fa1e22072 100644 --- a/apps/openmw/mwlua/object.cpp +++ b/apps/openmw/mwlua/object.cpp @@ -2,6 +2,8 @@ #include "types/types.hpp" +#include + namespace MWLua { @@ -12,8 +14,7 @@ namespace MWLua bool isMarker(const MWWorld::Ptr& ptr) { - std::string_view id = ptr.getCellRef().getRefId(); - return id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker"; + return Misc::ResourceHelpers::isHiddenMarker(ptr.getCellRef().getRefId()); } std::string ptrToString(const MWWorld::Ptr& ptr) diff --git a/apps/openmw/mwworld/ptr.hpp b/apps/openmw/mwworld/ptr.hpp index 33e062df90..c96f936127 100644 --- a/apps/openmw/mwworld/ptr.hpp +++ b/apps/openmw/mwworld/ptr.hpp @@ -7,6 +7,8 @@ #include #include +#include + #include "livecellref.hpp" namespace MWWorld @@ -58,7 +60,7 @@ namespace MWWorld std::string_view id = mRef->mRef.getRefId(); if (id == "player") return ESM::REC_INTERNAL_PLAYER; - else if (id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker") + else if (Misc::ResourceHelpers::isHiddenMarker(id)) return ESM::REC_INTERNAL_MARKER; else return mRef->getType();