mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 11:49:56 +00:00
40 lines
788 B
C++
40 lines
788 B
C++
#include "../mwbase/environment.hpp"
|
|
#include "../mwworld/worldimp.hpp"
|
|
#include <components/esm/cellid.hpp>
|
|
#include <components/openmw-mp/Log.hpp>
|
|
|
|
|
|
#include "WorldController.hpp"
|
|
#include "Main.hpp"
|
|
|
|
|
|
mwmp::WorldController::WorldController()
|
|
{
|
|
|
|
}
|
|
|
|
mwmp::WorldController::~WorldController()
|
|
{
|
|
|
|
}
|
|
|
|
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
|
|
{
|
|
try
|
|
{
|
|
cellStore = MWBase::Environment::get().getWorld()->getInterior(cell.mName);
|
|
}
|
|
catch (std::exception&)
|
|
{
|
|
cellStore = NULL;
|
|
}
|
|
}
|
|
|
|
return cellStore;
|
|
}
|