Skip to content

Commit

Permalink
Fix crash when viewing Playlists with rates outside the Calc range
Browse files Browse the repository at this point in the history
0.7x to 3.0x are the only calculated values and things outside this range just kind of crash the game in a lot of places because of that
  • Loading branch information
poco0317 committed Nov 29, 2019
1 parent b84d2fe commit a5d964d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Etterna/Singletons/SongManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,9 @@ Playlist::GetAverageRating()
int numloaded = 0;
for (auto& n : chartlist) {
if (n.loaded) {
o += n.stepsptr->GetMSD(n.rate, 0);
auto rate = n.rate;
CLAMP(rate, 0.7f, 3.f);
o += n.stepsptr->GetMSD(rate, 0);
++numloaded;
}
}
Expand Down

0 comments on commit a5d964d

Please sign in to comment.