2016-11-17 15:16:25 +00:00
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
#include "../mwworld/worldimp.hpp"
|
2016-11-15 17:13:36 +00:00
|
|
|
#include <components/esm/cellid.hpp>
|
2016-11-15 16:42:52 +00:00
|
|
|
#include <components/openmw-mp/Log.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include "WorldController.hpp"
|
|
|
|
#include "Main.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
mwmp::WorldController::WorldController()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mwmp::WorldController::~WorldController()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2016-11-15 17:13:36 +00:00
|
|
|
|
|
|
|
MWWorld::CellStore *mwmp::WorldController::getCell(const ESM::Cell& cell)
|
|
|
|
{
|
|
|
|
MWWorld::CellStore *cellStore;
|
|
|
|
|
|
|
|
if (cell.isExterior())
|
|
|
|
cellStore = MWBase::Environment::get().getWorld()->getExterior(cell.mData.mX, cell.mData.mY);
|
|
|
|
else
|
2016-11-15 17:51:05 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
cellStore = MWBase::Environment::get().getWorld()->getInterior(cell.mName);
|
|
|
|
}
|
|
|
|
catch (std::exception&)
|
|
|
|
{
|
|
|
|
cellStore = NULL;
|
|
|
|
}
|
|
|
|
}
|
2016-11-15 17:13:36 +00:00
|
|
|
|
|
|
|
return cellStore;
|
|
|
|
}
|