1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 01:23:52 +00:00

fixed a crash

This commit is contained in:
gugus 2012-08-11 22:08:04 +02:00
parent 0c8045d606
commit fb91f76a2b

View file

@ -249,21 +249,16 @@ namespace MWScript
std::string cellID = runtime.getStringLiteral (runtime[0].mInteger);
runtime.pop();
bool interior = true;
MWWorld::CellStore* store;
MWWorld::CellStore* store = 0;
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());
}
}