1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 08:23:51 +00:00

allow exterior cell for positioncell. Crash!

This commit is contained in:
gugus 2012-08-11 19:16:00 +02:00
parent 0bc48cc5ea
commit 0c8045d606

View file

@ -249,13 +249,21 @@ namespace MWScript
std::string cellID = runtime.getStringLiteral (runtime[0].mInteger); std::string cellID = runtime.getStringLiteral (runtime[0].mInteger);
runtime.pop(); runtime.pop();
bool interior = true;
MWWorld::CellStore* store = MWBase::Environment::get().getWorld()->getInterior(cellID); MWWorld::CellStore* store;
if(!store) try
{ {
MWWorld::CellStore* store = MWBase::Environment::get().getWorld()->getInterior(cellID);
}
catch(std::exception &e)
{
std::cout << "trying exterior";
const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getExterior(cellID); const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getExterior(cellID);
if(cell) if(cell)
{ {
std::cout << "exteriorfffffffffffffffffmZEJFB";
//cell->getGridX();
//MWBase::Environment::get().getWorld()->getExterior(cell->getGridX(),cell->getGridY());
store = MWBase::Environment::get().getWorld()->getExterior(cell->getGridX(),cell->getGridY()); store = MWBase::Environment::get().getWorld()->getExterior(cell->getGridX(),cell->getGridY());
} }
} }