|
|
|
@ -66,30 +66,7 @@ namespace
|
|
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
ESM::ESMReader World::getEsmReader(){
|
|
|
|
|
return mEsm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ptr::CellStore World::getMCurrentCell()
|
|
|
|
|
{
|
|
|
|
|
return *mCurrentCell;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ESM::Region World::getCurrentRegion()
|
|
|
|
|
{
|
|
|
|
|
return *currentRegion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool World::getIsExterior()
|
|
|
|
|
{
|
|
|
|
|
return isExterior;
|
|
|
|
|
}
|
|
|
|
|
void World::setIsExterior(bool set)
|
|
|
|
|
{
|
|
|
|
|
isExterior = set;
|
|
|
|
|
}
|
|
|
|
|
void World::insertInteriorScripts (ESMS::CellStore<RefData>& cell)
|
|
|
|
|
{
|
|
|
|
|
listCellScripts (mStore, cell.activators, mLocalScripts, &cell);
|
|
|
|
@ -343,7 +320,6 @@ namespace MWWorld
|
|
|
|
|
: mSkyManager (0), mScene (renderer), mPlayerPos (0), mCurrentCell (0), mGlobalVariables (0),
|
|
|
|
|
mSky (false), mCellChanged (false), mEnvironment (environment)
|
|
|
|
|
{
|
|
|
|
|
isExterior = false;
|
|
|
|
|
boost::filesystem::path masterPath (dataDir);
|
|
|
|
|
masterPath /= master;
|
|
|
|
|
|
|
|
|
@ -634,7 +610,6 @@ namespace MWWorld
|
|
|
|
|
adjustSky();
|
|
|
|
|
|
|
|
|
|
mCellChanged = true;
|
|
|
|
|
isExterior = false;
|
|
|
|
|
//currentRegion->name = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -712,11 +687,11 @@ namespace MWWorld
|
|
|
|
|
mCellChanged = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void World::changeToExteriorCell (const ESM::Position& position)
|
|
|
|
|
|
|
|
|
|
void World::changeToExteriorCell (const ESM::Position& position)
|
|
|
|
|
{
|
|
|
|
|
int x = 0;
|
|
|
|
|
int y = 0;
|
|
|
|
|
isExterior = true;
|
|
|
|
|
|
|
|
|
|
positionToIndex (position.pos[0], position.pos[1], x, y);
|
|
|
|
|
|
|
|
|
@ -727,21 +702,9 @@ namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
// first try named cells
|
|
|
|
|
if (const ESM::Cell *cell = mStore.cells.searchExtByName (cellName))
|
|
|
|
|
{
|
|
|
|
|
//mCellChanged = true;
|
|
|
|
|
|
|
|
|
|
getExteriorRegion(cell->region);
|
|
|
|
|
return cell;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return getExteriorRegion(cellName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const ESM::Cell *World::getExteriorRegion(const std::string& cellName) const
|
|
|
|
|
{
|
|
|
|
|
// didn't work -> now check for regions
|
|
|
|
|
// didn't work -> now check for regions
|
|
|
|
|
std::string cellName2 = ESMS::RecListT<ESM::Region>::toLower (cellName);
|
|
|
|
|
|
|
|
|
|
for (ESMS::RecListT<ESM::Region>::MapType::const_iterator iter (mStore.regions.list.begin());
|
|
|
|
@ -749,7 +712,6 @@ namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
if (ESMS::RecListT<ESM::Region>::toLower (iter->second.name)==cellName2)
|
|
|
|
|
{
|
|
|
|
|
*currentRegion = iter->second;
|
|
|
|
|
if (const ESM::Cell *cell = mStore.cells.searchExtByRegion (iter->first))
|
|
|
|
|
return cell;
|
|
|
|
|
|
|
|
|
@ -757,9 +719,8 @@ namespace MWWorld
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
void World::markCellAsUnchanged()
|
|
|
|
|
{
|
|
|
|
|
mCellChanged = false;
|
|
|
|
|