diff --git a/apps/openmw/mwmp/CellController.cpp b/apps/openmw/mwmp/CellController.cpp index bfa8ee37b..43a16587a 100644 --- a/apps/openmw/mwmp/CellController.cpp +++ b/apps/openmw/mwmp/CellController.cpp @@ -170,9 +170,14 @@ std::string CellController::generateMapIndex(BaseActor baseActor) return mapIndex; } -int CellController::getCellSize() const +bool CellController::isActiveCell(const ESM::Cell& cell) { - return 8192; + return (cellsActive.count(cell.getDescription()) > 0); +} + +Cell *CellController::getCell(const ESM::Cell& cell) +{ + return cellsActive.at(cell.getDescription()); } MWWorld::CellStore *CellController::getCellStore(const ESM::Cell& cell) @@ -240,3 +245,8 @@ void CellController::closeContainer(const MWWorld::Ptr &container) Main::get().getLocalPlayer()->updateInventory(); } + +int CellController::getCellSize() const +{ + return 8192; +} diff --git a/apps/openmw/mwmp/CellController.hpp b/apps/openmw/mwmp/CellController.hpp index 86dde640d..f4ee32ece 100644 --- a/apps/openmw/mwmp/CellController.hpp +++ b/apps/openmw/mwmp/CellController.hpp @@ -36,12 +36,16 @@ namespace mwmp std::string generateMapIndex(MWWorld::Ptr ptr); std::string generateMapIndex(mwmp::BaseActor baseActor); - int getCellSize() const; + bool isActiveCell(const ESM::Cell& cell); + virtual Cell *getCell(const ESM::Cell& cell); + virtual MWWorld::CellStore *getCellStore(const ESM::Cell& cell); void openContainer(const MWWorld::Ptr& container, bool loot); void closeContainer(const MWWorld::Ptr& container); + int getCellSize() const; + private: static std::map cellsActive; static std::map localActorsToCells;