Skip to content

Commit

Permalink
Use float for SR in osu databases created after 20250107
Browse files Browse the repository at this point in the history
  • Loading branch information
mrflashstudio committed Jan 11, 2025
1 parent f7164fd commit 5657dcb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OsuParsers/Encoders/DatabaseEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ public static void EncodeOsuDatabase(string path, OsuDatabase db)
writer.Write(beatmap.HPDrain);
writer.Write(beatmap.OverallDifficulty);
writer.Write(beatmap.SliderVelocity);
if (db.OsuVersion >= 20140609)
if (db.OsuVersion >= 20250107)
{
writer.Write(beatmap.StandardStarRating.ToDictionary(d => (int)d.Key, d => (float)d.Value));
writer.Write(beatmap.TaikoStarRating.ToDictionary(d => (int)d.Key, d => (float)d.Value));
writer.Write(beatmap.CatchStarRating.ToDictionary(d => (int)d.Key, d => (float)d.Value));
writer.Write(beatmap.ManiaStarRating.ToDictionary(d => (int)d.Key, d => (float)d.Value));
}
else if (db.OsuVersion >= 20140609)
{
writer.Write(beatmap.StandardStarRating.ToDictionary(d => (int)d.Key, d => d.Value));
writer.Write(beatmap.TaikoStarRating.ToDictionary(d => (int)d.Key, d => d.Value));
Expand Down

0 comments on commit 5657dcb

Please sign in to comment.