mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 16:09:42 +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 #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 #6115: Showmap overzealous matching
|
||||
|
||||
0.47.0
|
||||
------
|
||||
|
|
|
@ -124,17 +124,14 @@ namespace MWScript
|
|||
const MWWorld::Store<ESM::Cell> &cells =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Cell>();
|
||||
|
||||
MWWorld::Store<ESM::Cell>::iterator it = cells.extBegin();
|
||||
for (; it != cells.extEnd(); ++it)
|
||||
MWBase::WindowManager *winMgr = MWBase::Environment::get().getWindowManager();
|
||||
|
||||
for (auto it = cells.extBegin(); it != cells.extEnd(); ++it)
|
||||
{
|
||||
std::string name = it->mName;
|
||||
::Misc::StringUtils::lowerCaseInPlace(name);
|
||||
if (name.find(cell) != std::string::npos)
|
||||
MWBase::Environment::get().getWindowManager()->addVisitedLocation (
|
||||
it->mName,
|
||||
it->getGridX(),
|
||||
it->getGridY()
|
||||
);
|
||||
if (name.length() >= cell.length() && name.substr(0, cell.length()) == cell)
|
||||
winMgr->addVisitedLocation(it->mName, it->getGridX(), it->getGridY());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue