diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 7afd0697eb..4110c8f489 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -129,6 +129,8 @@ namespace MWBase virtual MWWorld::CellStore *getCell (const ESM::CellId& id) = 0; + virtual bool isCellActive(MWWorld::CellStore* cell) const = 0; + virtual void testExteriorCells() = 0; virtual void testInteriorCells() = 0; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 99bd53ef3f..8fea737d8d 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -570,6 +570,11 @@ namespace MWWorld return getInterior (id.mWorldspace); } + bool World::isCellActive(CellStore* cell) const + { + return mWorldScene->getActiveCells().count(cell) > 0; + } + void World::testExteriorCells() { mWorldScene->testExteriorCells(); diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 2ed69aabdf..87cd14dd5c 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -216,6 +216,8 @@ namespace MWWorld CellStore *getCell (const ESM::CellId& id) override; + bool isCellActive(CellStore* cell) const override; + void testExteriorCells() override; void testInteriorCells() override;