Skip to content

Commit 93362d2

Browse files
committed
GetChartsMatchingFilter: hacky rate addition & limit charts out to 1 each
this addition is really bad, should find a more consistent solution further down the line
1 parent fcada3e commit 93362d2

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/Etterna/Models/Songs/Song.cpp‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,15 @@ Song::GetChartsMatchingFilter() const
16511651
currate -= 0.1F) { /* Iterate over all possible rates.
16521652
* The .01f delta is because floating points
16531653
* don't like exact equivalency*/
1654-
if (i->MatchesFilter(currate))
1654+
// we must add 0.001 to the currate to force it to align when
1655+
// converting the rate to an index within GetMSD
1656+
// TODO: less hacky solution for this (this isnt the only place we do this)
1657+
if (i->MatchesFilter(currate + 0.001F)) {
1658+
// chart matched on a rate, add it only once
16551659
matches.push_back(i);
1660+
break;
1661+
}
1662+
16561663
}
16571664
}
16581665
return matches;

0 commit comments

Comments
 (0)