From dda809d345e1935e58afe749c398203f8d6d4046 Mon Sep 17 00:00:00 2001 From: Nimetu Date: Fri, 7 Apr 2017 12:43:33 +0300 Subject: [PATCH] Changed: Remove map landmark limit --HG-- branch : develop --- code/ryzom/client/src/continent.cpp | 7 ------- code/ryzom/client/src/continent.h | 3 --- code/ryzom/client/src/interface_v3/group_compas.cpp | 5 ++--- code/ryzom/client/src/interface_v3/group_map.cpp | 12 ++---------- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/code/ryzom/client/src/continent.cpp b/code/ryzom/client/src/continent.cpp index 65bf11de7..51b8c9280 100644 --- a/code/ryzom/client/src/continent.cpp +++ b/code/ryzom/client/src/continent.cpp @@ -1384,10 +1384,3 @@ void CContinent::releaseSky() CurrentSky.release(); } - -//========================================================================= -/*static*/ uint CContinent::getMaxNbUserLandMarks() -{ - uint nbBonusLandmarks = (uint)IngameDbMngr.getProp( "INTERFACES:NB_BONUS_LANDMARKS" ); - return STANDARD_NUM_USER_LANDMARKS + nbBonusLandmarks; -} diff --git a/code/ryzom/client/src/continent.h b/code/ryzom/client/src/continent.h index e925489bf..838054481 100644 --- a/code/ryzom/client/src/continent.h +++ b/code/ryzom/client/src/continent.h @@ -133,9 +133,6 @@ public: }; -const uint STANDARD_NUM_USER_LANDMARKS = 256; // not counting bonus landmarks - - /** * Class to manage the fog of war over a continent * \author Matthieu 'Trap' Besson diff --git a/code/ryzom/client/src/interface_v3/group_compas.cpp b/code/ryzom/client/src/interface_v3/group_compas.cpp index 55cfe895c..7c2b86984 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.cpp +++ b/code/ryzom/client/src/interface_v3/group_compas.cpp @@ -851,14 +851,13 @@ void CGroupCompasMenu::setActive (bool state) { landMarkSubMenu->addSeparatorAtIndex(contLandMarkIndex++); } - // User landmarks - uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() ); + // User landmarks // Sort the landmarks std::vector sortedLandmarks(currCont->UserLandMarks); std::sort(sortedLandmarks.begin(), sortedLandmarks.end(), UserLandMarksSortPredicate); - for(k = 0; k < nbUserLandMarks; ++k) + for(k = 0; k < sortedLandmarks.size(); ++k) { if (sortedLandmarks[k].Type < CUserLandMark::UserLandMarkTypeCount) { diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 2fa37ddb1..e38bb3d62 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -2391,9 +2391,8 @@ void CGroupMap::createContinentLandMarks() // Continent Landmarks createLMWidgets(_CurContinent->ContLandMarks); - uint nbUserLandMarks = std::min( uint(_CurContinent->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks()); // User Landmarks - for(k = 0; k < nbUserLandMarks; ++k) + for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k) { NLMISC::CVector2f mapPos; worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos); @@ -2431,8 +2430,7 @@ void CGroupMap::updateUserLandMarks() removeLandMarks(_UserLM); // Re create User Landmarks - uint nbUserLandMarks = std::min( uint(_CurContinent->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks()); - for(k = 0; k < nbUserLandMarks; ++k) + for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k) { NLMISC::CVector2f mapPos; worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos); @@ -3263,12 +3261,6 @@ void createUserLandMark(CCtrlBase * /* pCaller */, const string &/* params */) // pop the rename dialog LastClickedMap = dynamic_cast(CWidgetManager::getInstance()->getCtrlLaunchingModal()); if (LastClickedMap->isInDeathMode()) return; - if (LastClickedMap->getNumUserLandMarks() >= CContinent::getMaxNbUserLandMarks() ) - { - // too many landmark, can't create - im->displaySystemInfo(CI18N::get("uiNoMoreLandMarks"), "CHK"); - return; - } LastSelectedLandMark = NULL; popupLandMarkNameDialog(); }