1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Add function World::isCellActive

This commit is contained in:
Petr Mikheev 2021-05-04 22:56:29 +02:00
parent 702eb19271
commit 43b7e6964a
3 changed files with 9 additions and 0 deletions

View file

@ -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;

View file

@ -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();

View file

@ -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;