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:
parent
0bc48cc5ea
commit
0c8045d606
1 changed files with 11 additions and 3 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue