1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +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);
runtime.pop();
MWWorld::CellStore* store = MWBase::Environment::get().getWorld()->getInterior(cellID);
if(!store)
bool interior = true;
MWWorld::CellStore* 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);
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());
}
}