1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:53:51 +00:00

Stub out CellStore::get<T> accessors in preparation of reference movement between cells

This commit is contained in:
scrawl 2015-11-14 16:59:25 +01:00
parent 4a9b37aa53
commit 0975f60d59
22 changed files with 60 additions and 176 deletions

View file

@ -130,6 +130,7 @@ namespace MWClass
MWWorld::LiveCellRef<ESM::Activator> *ref = MWWorld::LiveCellRef<ESM::Activator> *ref =
ptr.get<ESM::Activator>(); ptr.get<ESM::Activator>();
return MWWorld::Ptr(&cell.get<ESM::Activator>().insert(*ref), &cell); return MWWorld::Ptr();
//return MWWorld::Ptr(&cell.get<ESM::Activator>().insert(*ref), &cell);
} }
} }

View file

@ -147,8 +147,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Apparatus> *ref = MWWorld::LiveCellRef<ESM::Apparatus> *ref =
ptr.get<ESM::Apparatus>(); ptr.get<ESM::Apparatus>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Apparatus>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Apparatus>().insert(*ref), &cell);
} }
bool Apparatus::canSell (const MWWorld::Ptr& item, int npcServices) const bool Apparatus::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -381,8 +381,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Armor> *ref = MWWorld::LiveCellRef<ESM::Armor> *ref =
ptr.get<ESM::Armor>(); ptr.get<ESM::Armor>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Armor>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Armor>().insert(*ref), &cell);
} }
int Armor::getEnchantmentPoints (const MWWorld::Ptr& ptr) const int Armor::getEnchantmentPoints (const MWWorld::Ptr& ptr) const

View file

@ -186,8 +186,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Book> *ref = MWWorld::LiveCellRef<ESM::Book> *ref =
ptr.get<ESM::Book>(); ptr.get<ESM::Book>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Book>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Book>().insert(*ref), &cell);
} }
int Book::getEnchantmentPoints (const MWWorld::Ptr& ptr) const int Book::getEnchantmentPoints (const MWWorld::Ptr& ptr) const

View file

@ -275,8 +275,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Clothing> *ref = MWWorld::LiveCellRef<ESM::Clothing> *ref =
ptr.get<ESM::Clothing>(); ptr.get<ESM::Clothing>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Clothing>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Clothing>().insert(*ref), &cell);
} }
int Clothing::getEnchantmentPoints (const MWWorld::Ptr& ptr) const int Clothing::getEnchantmentPoints (const MWWorld::Ptr& ptr) const

View file

@ -292,8 +292,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Container> *ref = MWWorld::LiveCellRef<ESM::Container> *ref =
ptr.get<ESM::Container>(); ptr.get<ESM::Container>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Container>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Container>().insert(*ref), &cell);
} }
void Container::readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const void Container::readAdditionalState (const MWWorld::Ptr& ptr, const ESM::ObjectState& state) const

View file

@ -599,8 +599,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Creature> *ref = MWWorld::LiveCellRef<ESM::Creature> *ref =
ptr.get<ESM::Creature>(); ptr.get<ESM::Creature>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Creature>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Creature>().insert(*ref), &cell);
} }
bool Creature::isBipedal(const MWWorld::Ptr &ptr) const bool Creature::isBipedal(const MWWorld::Ptr &ptr) const

View file

@ -309,8 +309,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Door> *ref = MWWorld::LiveCellRef<ESM::Door> *ref =
ptr.get<ESM::Door>(); ptr.get<ESM::Door>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Door>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Door>().insert(*ref), &cell);
} }
void Door::ensureCustomData(const MWWorld::Ptr &ptr) const void Door::ensureCustomData(const MWWorld::Ptr &ptr) const

View file

@ -184,8 +184,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Ingredient> *ref = MWWorld::LiveCellRef<ESM::Ingredient> *ref =
ptr.get<ESM::Ingredient>(); ptr.get<ESM::Ingredient>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Ingredient>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Ingredient>().insert(*ref), &cell);
} }
bool Ingredient::canSell (const MWWorld::Ptr& item, int npcServices) const bool Ingredient::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -216,8 +216,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Light> *ref = MWWorld::LiveCellRef<ESM::Light> *ref =
ptr.get<ESM::Light>(); ptr.get<ESM::Light>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Light>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Light>().insert(*ref), &cell);
} }
bool Light::canSell (const MWWorld::Ptr& item, int npcServices) const bool Light::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -165,8 +165,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Lockpick> *ref = MWWorld::LiveCellRef<ESM::Lockpick> *ref =
ptr.get<ESM::Lockpick>(); ptr.get<ESM::Lockpick>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Lockpick>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Lockpick>().insert(*ref), &cell);
} }
bool Lockpick::canSell (const MWWorld::Ptr& item, int npcServices) const bool Lockpick::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -194,6 +194,7 @@ namespace MWClass
{ {
MWWorld::Ptr newPtr; MWWorld::Ptr newPtr;
/*
const MWWorld::ESMStore &store = const MWWorld::ESMStore &store =
MWBase::Environment::get().getWorld()->getStore(); MWBase::Environment::get().getWorld()->getStore();
@ -223,6 +224,7 @@ namespace MWClass
ptr.get<ESM::Miscellaneous>(); ptr.get<ESM::Miscellaneous>();
newPtr = MWWorld::Ptr(&cell.get<ESM::Miscellaneous>().insert(*ref), &cell); newPtr = MWWorld::Ptr(&cell.get<ESM::Miscellaneous>().insert(*ref), &cell);
} }
*/
return newPtr; return newPtr;
} }

View file

@ -1129,8 +1129,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::NPC> *ref = MWWorld::LiveCellRef<ESM::NPC> *ref =
ptr.get<ESM::NPC>(); ptr.get<ESM::NPC>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::NPC>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::NPC>().insert(*ref), &cell);
} }
int Npc::getSkill(const MWWorld::Ptr& ptr, int skill) const int Npc::getSkill(const MWWorld::Ptr& ptr, int skill) const

View file

@ -177,8 +177,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Potion> *ref = MWWorld::LiveCellRef<ESM::Potion> *ref =
ptr.get<ESM::Potion>(); ptr.get<ESM::Potion>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Potion>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Potion>().insert(*ref), &cell);
} }
bool Potion::canSell (const MWWorld::Ptr& item, int npcServices) const bool Potion::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -164,8 +164,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Probe> *ref = MWWorld::LiveCellRef<ESM::Probe> *ref =
ptr.get<ESM::Probe>(); ptr.get<ESM::Probe>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Probe>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Probe>().insert(*ref), &cell);
} }
bool Probe::canSell (const MWWorld::Ptr& item, int npcServices) const bool Probe::canSell (const MWWorld::Ptr& item, int npcServices) const

View file

@ -159,8 +159,9 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Repair> *ref = MWWorld::LiveCellRef<ESM::Repair> *ref =
ptr.get<ESM::Repair>(); ptr.get<ESM::Repair>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Repair>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Repair>().insert(*ref), &cell);
} }
boost::shared_ptr<MWWorld::Action> Repair::use (const MWWorld::Ptr& ptr) const boost::shared_ptr<MWWorld::Action> Repair::use (const MWWorld::Ptr& ptr) const

View file

@ -59,7 +59,8 @@ namespace MWClass
{ {
MWWorld::LiveCellRef<ESM::Static> *ref = MWWorld::LiveCellRef<ESM::Static> *ref =
ptr.get<ESM::Static>(); ptr.get<ESM::Static>();
return MWWorld::Ptr();
return MWWorld::Ptr(&cell.get<ESM::Static>().insert(*ref), &cell); //return MWWorld::Ptr(&cell.get<ESM::Static>().insert(*ref), &cell);
} }
} }

View file

@ -417,7 +417,8 @@ namespace MWClass
MWWorld::LiveCellRef<ESM::Weapon> *ref = MWWorld::LiveCellRef<ESM::Weapon> *ref =
ptr.get<ESM::Weapon>(); ptr.get<ESM::Weapon>();
return MWWorld::Ptr(&cell.get<ESM::Weapon>().insert(*ref), &cell); return MWWorld::Ptr();
//return MWWorld::Ptr(&cell.get<ESM::Weapon>().insert(*ref), &cell);
} }
int Weapon::getEnchantmentPoints (const MWWorld::Ptr& ptr) const int Weapon::getEnchantmentPoints (const MWWorld::Ptr& ptr) const

View file

@ -44,6 +44,7 @@ namespace MWMechanics
return MWWorld::Ptr(); // check interior cells only return MWWorld::Ptr(); // check interior cells only
// Check all the doors in this cell // Check all the doors in this cell
/*
MWWorld::CellRefList<ESM::Door>& doors = cell->get<ESM::Door>(); MWWorld::CellRefList<ESM::Door>& doors = cell->get<ESM::Door>();
MWWorld::CellRefList<ESM::Door>::List& refList = doors.mList; MWWorld::CellRefList<ESM::Door>::List& refList = doors.mList;
MWWorld::CellRefList<ESM::Door>::List::iterator it = refList.begin(); MWWorld::CellRefList<ESM::Door>::List::iterator it = refList.begin();
@ -66,6 +67,7 @@ namespace MWMechanics
return MWWorld::Ptr(&ref, actor.getCell()); // found, stop searching return MWWorld::Ptr(&ref, actor.getCell()); // found, stop searching
} }
} }
*/
return MWWorld::Ptr(); // none found return MWWorld::Ptr(); // none found
} }

View file

@ -73,6 +73,7 @@ namespace MWWorld
MWWorld::TimeStamp mLastRespawn; MWWorld::TimeStamp mLastRespawn;
// List of refs owned by this cell
CellRefList<ESM::Activator> mActivators; CellRefList<ESM::Activator> mActivators;
CellRefList<ESM::Potion> mPotions; CellRefList<ESM::Potion> mPotions;
CellRefList<ESM::Apparatus> mAppas; CellRefList<ESM::Apparatus> mAppas;
@ -179,6 +180,8 @@ namespace MWWorld
forEachImp (functor, mNpcs); forEachImp (functor, mNpcs);
} }
/// \todo add const version of forEach
bool isExterior() const; bool isExterior() const;
Ptr searchInContainer (const std::string& id); Ptr searchInContainer (const std::string& id);
@ -198,16 +201,6 @@ namespace MWWorld
void respawn (); void respawn ();
///< Check mLastRespawn and respawn references if necessary. This is a no-op if the cell is not loaded. ///< Check mLastRespawn and respawn references if necessary. This is a no-op if the cell is not loaded.
template <class T>
CellRefList<T>& get() {
throw std::runtime_error ("Storage for type " + std::string(typeid(T).name())+ " does not exist in cells");
}
template <class T>
const CellRefList<T>& getReadOnly() {
throw std::runtime_error ("Read Only CellRefList access not available for type " + std::string(typeid(T).name()) );
}
bool isPointConnected(const int start, const int end) const; bool isPointConnected(const int start, const int end) const;
std::list<ESM::Pathgrid::Point> aStarSearch(const int start, const int end) const; std::list<ESM::Pathgrid::Point> aStarSearch(const int start, const int end) const;
@ -241,152 +234,6 @@ namespace MWWorld
MWMechanics::PathgridGraph mPathgridGraph; MWMechanics::PathgridGraph mPathgridGraph;
}; };
template<>
inline CellRefList<ESM::Activator>& CellStore::get<ESM::Activator>()
{
mHasState = true;
return mActivators;
}
template<>
inline CellRefList<ESM::Potion>& CellStore::get<ESM::Potion>()
{
mHasState = true;
return mPotions;
}
template<>
inline CellRefList<ESM::Apparatus>& CellStore::get<ESM::Apparatus>()
{
mHasState = true;
return mAppas;
}
template<>
inline CellRefList<ESM::Armor>& CellStore::get<ESM::Armor>()
{
mHasState = true;
return mArmors;
}
template<>
inline CellRefList<ESM::Book>& CellStore::get<ESM::Book>()
{
mHasState = true;
return mBooks;
}
template<>
inline CellRefList<ESM::Clothing>& CellStore::get<ESM::Clothing>()
{
mHasState = true;
return mClothes;
}
template<>
inline CellRefList<ESM::Container>& CellStore::get<ESM::Container>()
{
mHasState = true;
return mContainers;
}
template<>
inline CellRefList<ESM::Creature>& CellStore::get<ESM::Creature>()
{
mHasState = true;
return mCreatures;
}
template<>
inline CellRefList<ESM::Door>& CellStore::get<ESM::Door>()
{
mHasState = true;
return mDoors;
}
template<>
inline CellRefList<ESM::Ingredient>& CellStore::get<ESM::Ingredient>()
{
mHasState = true;
return mIngreds;
}
template<>
inline CellRefList<ESM::CreatureLevList>& CellStore::get<ESM::CreatureLevList>()
{
mHasState = true;
return mCreatureLists;
}
template<>
inline CellRefList<ESM::ItemLevList>& CellStore::get<ESM::ItemLevList>()
{
mHasState = true;
return mItemLists;
}
template<>
inline CellRefList<ESM::Light>& CellStore::get<ESM::Light>()
{
mHasState = true;
return mLights;
}
template<>
inline CellRefList<ESM::Lockpick>& CellStore::get<ESM::Lockpick>()
{
mHasState = true;
return mLockpicks;
}
template<>
inline CellRefList<ESM::Miscellaneous>& CellStore::get<ESM::Miscellaneous>()
{
mHasState = true;
return mMiscItems;
}
template<>
inline CellRefList<ESM::NPC>& CellStore::get<ESM::NPC>()
{
mHasState = true;
return mNpcs;
}
template<>
inline CellRefList<ESM::Probe>& CellStore::get<ESM::Probe>()
{
mHasState = true;
return mProbes;
}
template<>
inline CellRefList<ESM::Repair>& CellStore::get<ESM::Repair>()
{
mHasState = true;
return mRepairs;
}
template<>
inline CellRefList<ESM::Static>& CellStore::get<ESM::Static>()
{
mHasState = true;
return mStatics;
}
template<>
inline CellRefList<ESM::Weapon>& CellStore::get<ESM::Weapon>()
{
mHasState = true;
return mWeapons;
}
template<>
inline const CellRefList<ESM::Door>& CellStore::getReadOnly<ESM::Door>()
{
return mDoors;
}
bool operator== (const CellStore& left, const CellStore& right); bool operator== (const CellStore& left, const CellStore& right);
bool operator!= (const CellStore& left, const CellStore& right); bool operator!= (const CellStore& left, const CellStore& right);
} }

View file

@ -116,6 +116,7 @@ void MWWorld::LocalScripts::add (const std::string& scriptName, const Ptr& ptr)
void MWWorld::LocalScripts::addCell (CellStore *cell) void MWWorld::LocalScripts::addCell (CellStore *cell)
{ {
/*
listCellScripts (*this, cell->get<ESM::Activator>(), cell); listCellScripts (*this, cell->get<ESM::Activator>(), cell);
listCellScripts (*this, cell->get<ESM::Potion>(), cell); listCellScripts (*this, cell->get<ESM::Potion>(), cell);
listCellScripts (*this, cell->get<ESM::Apparatus>(), cell); listCellScripts (*this, cell->get<ESM::Apparatus>(), cell);
@ -136,6 +137,7 @@ void MWWorld::LocalScripts::addCell (CellStore *cell)
listCellScripts (*this, cell->get<ESM::Probe>(), cell); listCellScripts (*this, cell->get<ESM::Probe>(), cell);
listCellScripts (*this, cell->get<ESM::Repair>(), cell); listCellScripts (*this, cell->get<ESM::Repair>(), cell);
listCellScripts (*this, cell->get<ESM::Weapon>(), cell); listCellScripts (*this, cell->get<ESM::Weapon>(), cell);
*/
} }
void MWWorld::LocalScripts::clear() void MWWorld::LocalScripts::clear()

View file

@ -1693,6 +1693,7 @@ namespace MWWorld
osg::Vec2f World::getNorthVector (CellStore* cell) osg::Vec2f World::getNorthVector (CellStore* cell)
{ {
/*
MWWorld::CellRefList<ESM::Static>& statics = cell->get<ESM::Static>(); MWWorld::CellRefList<ESM::Static>& statics = cell->get<ESM::Static>();
MWWorld::LiveCellRef<ESM::Static>* ref = statics.find("northmarker"); MWWorld::LiveCellRef<ESM::Static>* ref = statics.find("northmarker");
if (!ref) if (!ref)
@ -1702,10 +1703,13 @@ namespace MWWorld
osg::Vec3f dir = orient * osg::Vec3f(0,1,0); osg::Vec3f dir = orient * osg::Vec3f(0,1,0);
osg::Vec2f d (dir.x(), dir.y()); osg::Vec2f d (dir.x(), dir.y());
return d; return d;
*/
return osg::Vec2f();
} }
void World::getDoorMarkers (CellStore* cell, std::vector<World::DoorMarker>& out) void World::getDoorMarkers (CellStore* cell, std::vector<World::DoorMarker>& out)
{ {
/*
MWWorld::CellRefList<ESM::Door>& doors = cell->get<ESM::Door>(); MWWorld::CellRefList<ESM::Door>& doors = cell->get<ESM::Door>();
CellRefList<ESM::Door>::List& refList = doors.mList; CellRefList<ESM::Door>::List& refList = doors.mList;
for (CellRefList<ESM::Door>::List::iterator it = refList.begin(); it != refList.end(); ++it) for (CellRefList<ESM::Door>::List::iterator it = refList.begin(); it != refList.end(); ++it)
@ -1744,6 +1748,7 @@ namespace MWWorld
out.push_back(newMarker); out.push_back(newMarker);
} }
} }
*/
} }
void World::setWaterHeight(const float height) void World::setWaterHeight(const float height)
@ -2240,6 +2245,7 @@ namespace MWWorld
void World::getContainersOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out) void World::getContainersOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out)
{ {
/*
const Scene::CellStoreCollection& collection = mWorldScene->getActiveCells(); const Scene::CellStoreCollection& collection = mWorldScene->getActiveCells();
for (Scene::CellStoreCollection::const_iterator cellIt = collection.begin(); cellIt != collection.end(); ++cellIt) for (Scene::CellStoreCollection::const_iterator cellIt = collection.begin(); cellIt != collection.end(); ++cellIt)
{ {
@ -2254,6 +2260,7 @@ namespace MWWorld
out.push_back(ptr); out.push_back(ptr);
} }
} }
*/
} }
struct ListObjectsFunctor struct ListObjectsFunctor
@ -2316,6 +2323,8 @@ namespace MWWorld
bool World::findInteriorPosition(const std::string &name, ESM::Position &pos) bool World::findInteriorPosition(const std::string &name, ESM::Position &pos)
{ {
return false;
/*
typedef MWWorld::CellRefList<ESM::Door>::List DoorList; typedef MWWorld::CellRefList<ESM::Door>::List DoorList;
typedef MWWorld::CellRefList<ESM::Static>::List StaticList; typedef MWWorld::CellRefList<ESM::Static>::List StaticList;
@ -2368,6 +2377,7 @@ namespace MWWorld
pos = statics.begin()->mRef.getPosition(); pos = statics.begin()->mRef.getPosition();
return true; return true;
} }
*/
return false; return false;
} }
@ -2715,6 +2725,8 @@ namespace MWWorld
bool World::findInteriorPositionInWorldSpace(MWWorld::CellStore* cell, osg::Vec3f& result) bool World::findInteriorPositionInWorldSpace(MWWorld::CellStore* cell, osg::Vec3f& result)
{ {
return false;
/*
if (cell->isExterior()) if (cell->isExterior())
return false; return false;
@ -2732,7 +2744,7 @@ namespace MWWorld
MWWorld::CellStore *next = getInterior( *i ); MWWorld::CellStore *next = getInterior( *i );
if ( !next ) continue; if ( !next ) continue;
const MWWorld::CellRefList<ESM::Door>& doors = next->getReadOnly<ESM::Door>(); const MWWorld::CellRefList<ESM::Door>& doors = next->getReadOnlyDoors();
const CellRefList<ESM::Door>::List& refList = doors.mList; const CellRefList<ESM::Door>::List& refList = doors.mList;
// Check if any door in the cell leads to an exterior directly // Check if any door in the cell leads to an exterior directly
@ -2761,10 +2773,12 @@ namespace MWWorld
// No luck :( // No luck :(
return false; return false;
*/
} }
MWWorld::Ptr World::getClosestMarker( const MWWorld::Ptr &ptr, const std::string &id ) MWWorld::Ptr World::getClosestMarker( const MWWorld::Ptr &ptr, const std::string &id )
{ {
/*
if ( ptr.getCell()->isExterior() ) { if ( ptr.getCell()->isExterior() ) {
return getClosestMarkerFromExteriorPosition(mPlayer->getLastKnownExteriorPosition(), id); return getClosestMarkerFromExteriorPosition(mPlayer->getLastKnownExteriorPosition(), id);
} }
@ -2792,7 +2806,7 @@ namespace MWWorld
return closestMarker; return closestMarker;
} }
const MWWorld::CellRefList<ESM::Door>& doors = next->getReadOnly<ESM::Door>(); const MWWorld::CellRefList<ESM::Door>& doors = next->getReadOnlyDoors();
const CellRefList<ESM::Door>::List& doorList = doors.mList; const CellRefList<ESM::Door>::List& doorList = doors.mList;
// Check if any door in the cell leads to an exterior directly // Check if any door in the cell leads to an exterior directly
@ -2816,7 +2830,7 @@ namespace MWWorld
} }
} }
} }
*/
return MWWorld::Ptr(); return MWWorld::Ptr();
} }