Fix ShowMap partial match filtering (bug #6115)

dont-compose-content
Dobrohotov Alexei 3 years ago
parent 07c3ed16d0
commit 3cab69c389

@ -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…
Cancel
Save