Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change userBeatmapOffsetClock to a FramedOffsetClock #27243

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions osu.Game/Beatmaps/FramedBeatmapClock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public partial class FramedBeatmapClock : Component, IFrameBasedClock, IAdjustab

private readonly OffsetCorrectionClock? userGlobalOffsetClock;
private readonly OffsetCorrectionClock? platformOffsetClock;
private readonly OffsetCorrectionClock? userBeatmapOffsetClock;
private readonly FramedOffsetClock? userBeatmapOffsetClock;

private readonly IFrameBasedClock finalClockSource;

Expand Down Expand Up @@ -70,7 +70,7 @@ public FramedBeatmapClock(bool applyOffsets, bool requireDecoupling, IClock? sou
userGlobalOffsetClock = new OffsetCorrectionClock(platformOffsetClock);

// User per-beatmap offset will be applied to this final clock.
finalClockSource = userBeatmapOffsetClock = new OffsetCorrectionClock(userGlobalOffsetClock);
finalClockSource = userBeatmapOffsetClock = new FramedOffsetClock(userGlobalOffsetClock);
}
else
{
Expand Down Expand Up @@ -122,7 +122,7 @@ public double TotalAppliedOffset
Debug.Assert(userBeatmapOffsetClock != null);
Debug.Assert(platformOffsetClock != null);

return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.RateAdjustedOffset + platformOffsetClock.RateAdjustedOffset;
return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.Offset + platformOffsetClock.RateAdjustedOffset;
}
}

Expand Down
Loading