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:
Marc Zinnschlag 2012-05-17 17:13:41 +02:00
parent fdfddc8be7
commit 6b74fec8ed

View file

@ -251,6 +251,9 @@ namespace MWWorld
void Scene::changeToInteriorCell (const std::string& cellName, const ESM::Position& position)
{
std::cout << "Changing to interior\n";
Ptr::CellStore *cell = mWorld->getInterior(cellName);
// remove active
CellStoreCollection::iterator active = mActiveCells.begin();
@ -261,11 +264,9 @@ namespace MWWorld
// Load cell.
std::cout << "cellName:" << cellName << std::endl;
Ptr::CellStore *cell = mWorld->getInterior(cellName);
loadCell (cell);
// adjust player
mCurrentCell = cell;
playerCellChange (cell, position);