MergeFromOtherHSL() now 'Removes All But One Of Each Name' per preference
When merging two high score lists, the MergeFromOtherHSL() function only called ClampSize() but did not also call RemoveAllButOneOfEachName. This behavior was okay before because RemoveAllButOneOfEachName() was called on every single song on the machine every set. Since this is no longer behavior, we need to make sure this method calls this otherwise we may end up with a merged leaderboard that has the same person occuring more than once.
This commit is contained in:
@@ -445,6 +445,12 @@ void HighScoreList::MergeFromOtherHSL(HighScoreList& other, bool is_machine)
|
||||
vHighScores.erase(unique_end, vHighScores.end());
|
||||
// Reverse it because sort moved the lesser scores to the top.
|
||||
std::reverse(vHighScores.begin(), vHighScores.end());
|
||||
|
||||
if (!PREFSMAN->m_bAllowMultipleHighScoreWithSameName)
|
||||
{
|
||||
// erase all but the highest score for each name
|
||||
RemoveAllButOneOfEachName();
|
||||
}
|
||||
ClampSize(is_machine);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user