mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
make configurable
This commit is contained in:
@@ -279,15 +279,17 @@ int CHighScoreInputScreen::addEntry(std::string text) {
|
||||
ser.serializeStruct("statistic", stat);
|
||||
}
|
||||
|
||||
if (baseNode.size() > HIGHSCORE_ROW_SAVE - 1)
|
||||
baseNode.resize(HIGHSCORE_ROW_SAVE - 1);
|
||||
int highscoreEntriesCap = settings["general"]["highscoreEntriesCap"].Integer();
|
||||
if (baseNode.size() > highscoreEntriesCap - 1)
|
||||
baseNode.resize(highscoreEntriesCap - 1);
|
||||
|
||||
baseNode.push_back(newNode);
|
||||
boost::range::sort(baseNode, sortFunctor);
|
||||
|
||||
int pos = -1;
|
||||
for (int i = 0; i < baseNode.size(); i++)
|
||||
{
|
||||
if(!baseNode[i]["statistic"].isNull() && i >= Statistic::STAT_ROW_SAVE && baseNode[i]["posFlag"].isNull())
|
||||
if(!baseNode[i]["statistic"].isNull() && i >= settings["general"]["highscoreStatisticEntriesCap"].Integer() && baseNode[i]["posFlag"].isNull())
|
||||
baseNode[i]["statistic"].clear();
|
||||
|
||||
if(!baseNode[i]["posFlag"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user