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:
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);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue