1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 02:09:43 +00:00

Fix ShowMap partial match filtering (bug #6115)

This commit is contained in:
Dobrohotov Alexei 2021-07-03 01:03:57 +03:00
parent 07c3ed16d0
commit 3cab69c389
2 changed files with 6 additions and 8 deletions

View file

@ -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
------

View file

@ -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());
}
}
};