mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-17 07:11:33 +00:00
Merge branch 'showmap' into 'master'
Fix ShowMap partial match filtering (bug #6115) Closes #6115 See merge request OpenMW/openmw!987
This commit is contained in:
commit
8bdce3ebef
2 changed files with 6 additions and 8 deletions
|
@ -8,6 +8,7 @@
|
||||||
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
||||||
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
Bug #6066: addtopic "return" does not work from within script. No errors thrown
|
||||||
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
Bug #6101: Disarming trapped unlocked owned objects isn't considered a crime
|
||||||
|
Bug #6115: Showmap overzealous matching
|
||||||
|
|
||||||
0.47.0
|
0.47.0
|
||||||
------
|
------
|
||||||
|
|
|
@ -124,17 +124,14 @@ namespace MWScript
|
||||||
const MWWorld::Store<ESM::Cell> &cells =
|
const MWWorld::Store<ESM::Cell> &cells =
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Cell>();
|
MWBase::Environment::get().getWorld()->getStore().get<ESM::Cell>();
|
||||||
|
|
||||||
MWWorld::Store<ESM::Cell>::iterator it = cells.extBegin();
|
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
||||||
for (; it != cells.extEnd(); ++it)
|
|
||||||
|
for (auto it = cells.extBegin(); it != cells.extEnd(); ++it)
|
||||||
{
|
{
|
||||||
std::string name = it->mName;
|
std::string name = it->mName;
|
||||||
::Misc::StringUtils::lowerCaseInPlace(name);
|
::Misc::StringUtils::lowerCaseInPlace(name);
|
||||||
if (name.find(cell) != std::string::npos)
|
if (name.length() >= cell.length() && name.substr(0, cell.length()) == cell)
|
||||||
MWBase::Environment::get().getWindowManager()->addVisitedLocation (
|
winMgr->addVisitedLocation(it->mName, it->getGridX(), it->getGridY());
|
||||||
it->mName,
|
|
||||||
it->getGridX(),
|
|
||||||
it->getGridY()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue