Skip to content

Commit 05a2b14

Browse files
Fix integer truncation in CatchBeatmapProcessor time delta calculation
Changed `timeDiff` calculation from `int` to `double` in `applyHardRockOffset` to prevent precision loss which was affecting randomization and offset application. Updated expected values for `CatchBeatmapConversionTest` case `1431386` as the fix alters Hard Rock object positions. Added `CatchBeatmapProcessorTest` to verify the fix. Addressed code style issues (license header, object initializer). Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent e8358f6 commit 05a2b14

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

osu.Game.Rulesets.Catch.Tests/CatchBeatmapProcessorTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ public void TestHardRockOffsetDoublePrecision()
3939
}
4040
};
4141

42-
var processor = new CatchBeatmapProcessor(beatmap);
43-
processor.HardRockOffsets = true;
42+
var processor = new CatchBeatmapProcessor(beatmap)
43+
{
44+
HardRockOffsets = true
45+
};
4446

4547
processor.ApplyPositionOffsets(beatmap);
4648

0 commit comments

Comments
 (0)