mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Fixed: map landmark bug (issue #15)
This commit is contained in:
parent
bb7297f260
commit
75d784c656
1 changed files with 6 additions and 5 deletions
|
@ -811,18 +811,19 @@ void CGroupCompasMenu::setActive (bool state)
|
||||||
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
||||||
|
|
||||||
// Sort the landmarks
|
// Sort the landmarks
|
||||||
std::sort(currCont->UserLandMarks.begin(), currCont->UserLandMarks.end(), UserLandMarksSortPredicate);
|
std::vector<CUserLandMark> sortedLandmarks(currCont->UserLandMarks);
|
||||||
|
std::sort(sortedLandmarks.begin(), sortedLandmarks.end(), UserLandMarksSortPredicate);
|
||||||
|
|
||||||
for(k = 0; k < nbUserLandMarks; ++k)
|
for(k = 0; k < nbUserLandMarks; ++k)
|
||||||
{
|
{
|
||||||
if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
if (sortedLandmarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
||||||
{
|
{
|
||||||
CCompassTarget ct;
|
CCompassTarget ct;
|
||||||
ct.setType(CCompassTarget::UserLandMark);
|
ct.setType(CCompassTarget::UserLandMark);
|
||||||
ct.Pos = currCont->UserLandMarks[k].Pos;
|
ct.Pos = sortedLandmarks[k].Pos;
|
||||||
ct.Name = currCont->UserLandMarks[k].Title;
|
ct.Name = sortedLandmarks[k].Title;
|
||||||
Targets.push_back(ct);
|
Targets.push_back(ct);
|
||||||
landMarkSubMenus[currCont->UserLandMarks[k].Type]->addLine(ct.Name, "set_compas", toString("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
landMarkSubMenus[sortedLandmarks[k].Type]->addLine(ct.Name, "set_compas", toString("compass=%s|id=%d|menu=%s", _TargetCompass.c_str(), (int) Targets.size() - 1, _Id.c_str()));
|
||||||
selectable= true;
|
selectable= true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue