forked from teamnwah/openmw-tes3coop
don't do a half finished cell change, when trying to switch to an interior cell that does not exist
This commit is contained in:
parent
fdfddc8be7
commit
6b74fec8ed
1 changed files with 3 additions and 2 deletions
|
@ -251,6 +251,9 @@ namespace MWWorld
|
||||||
void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
|
||||||
{
|
{
|
||||||
std::cout << "Changing to interior\n";
|
std::cout << "Changing to interior\n";
|
||||||
|
|
||||||
|
Ptr::CellStore *cell = mWorld->getInterior(cellName);
|
||||||
|
|
||||||
// remove active
|
// remove active
|
||||||
CellStoreCollection::iterator active = mActiveCells.begin();
|
CellStoreCollection::iterator active = mActiveCells.begin();
|
||||||
|
|
||||||
|
@ -261,11 +264,9 @@ namespace MWWorld
|
||||||
|
|
||||||
// Load cell.
|
// Load cell.
|
||||||
std::cout << "cellName:" << cellName << std::endl;
|
std::cout << "cellName:" << cellName << std::endl;
|
||||||
Ptr::CellStore *cell = mWorld->getInterior(cellName);
|
|
||||||
|
|
||||||
loadCell (cell);
|
loadCell (cell);
|
||||||
|
|
||||||
|
|
||||||
// adjust player
|
// adjust player
|
||||||
mCurrentCell = cell;
|
mCurrentCell = cell;
|
||||||
playerCellChange (cell, position);
|
playerCellChange (cell, position);
|
||||||
|
|
Loading…
Reference in a new issue