mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Account for not yet listed cells in getInteriorPtrs
This commit is contained in:
parent
14923f3e8b
commit
fbb8998184
@ -241,26 +241,30 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name)
|
|||||||
|
|
||||||
void MWWorld::Cells::getExteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
|
void MWWorld::Cells::getExteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
|
||||||
{
|
{
|
||||||
for (std::map<std::pair<int, int>, CellStore>::iterator iter = mExteriors.begin();
|
const MWWorld::Store<ESM::Cell> &cells = mStore.get<ESM::Cell>();
|
||||||
iter!=mExteriors.end(); ++iter)
|
for (MWWorld::Store<ESM::Cell>::iterator iter = cells.extBegin(); iter != cells.extEnd(); ++iter)
|
||||||
{
|
{
|
||||||
Ptr ptr = getPtrAndCache (name, iter->second);
|
CellStore *cellStore = getCellStore (&(*iter));
|
||||||
|
|
||||||
|
Ptr ptr = getPtrAndCache (name, *cellStore);
|
||||||
|
|
||||||
if (!ptr.isEmpty())
|
if (!ptr.isEmpty())
|
||||||
out.push_back(ptr);
|
out.push_back(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWWorld::Cells::getInteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
|
void MWWorld::Cells::getInteriorPtrs(const std::string &name, std::vector<MWWorld::Ptr> &out)
|
||||||
{
|
{
|
||||||
for (std::map<std::string, CellStore>::iterator iter = mInteriors.begin();
|
const MWWorld::Store<ESM::Cell> &cells = mStore.get<ESM::Cell>();
|
||||||
iter!=mInteriors.end(); ++iter)
|
for (MWWorld::Store<ESM::Cell>::iterator iter = cells.intBegin(); iter != cells.intEnd(); ++iter)
|
||||||
{
|
{
|
||||||
Ptr ptr = getPtrAndCache (name, iter->second);
|
CellStore *cellStore = getCellStore (&(*iter));
|
||||||
|
|
||||||
|
Ptr ptr = getPtrAndCache (name, *cellStore);
|
||||||
|
|
||||||
if (!ptr.isEmpty())
|
if (!ptr.isEmpty())
|
||||||
out.push_back(ptr);
|
out.push_back(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int MWWorld::Cells::countSavedGameRecords() const
|
int MWWorld::Cells::countSavedGameRecords() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user