mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 05:53:10 +08:00
Merge pull request #27243 from myQwil/beatmap_offset_virtual
Change `userBeatmapOffsetClock` to a `FramedOffsetClock`
This commit is contained in:
commit
fc34c5a505
@ -29,7 +29,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
private readonly OffsetCorrectionClock? userGlobalOffsetClock;
|
private readonly OffsetCorrectionClock? userGlobalOffsetClock;
|
||||||
private readonly OffsetCorrectionClock? platformOffsetClock;
|
private readonly OffsetCorrectionClock? platformOffsetClock;
|
||||||
private readonly OffsetCorrectionClock? userBeatmapOffsetClock;
|
private readonly FramedOffsetClock? userBeatmapOffsetClock;
|
||||||
|
|
||||||
private readonly IFrameBasedClock finalClockSource;
|
private readonly IFrameBasedClock finalClockSource;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ namespace osu.Game.Beatmaps
|
|||||||
userGlobalOffsetClock = new OffsetCorrectionClock(platformOffsetClock);
|
userGlobalOffsetClock = new OffsetCorrectionClock(platformOffsetClock);
|
||||||
|
|
||||||
// User per-beatmap offset will be applied to this final clock.
|
// User per-beatmap offset will be applied to this final clock.
|
||||||
finalClockSource = userBeatmapOffsetClock = new OffsetCorrectionClock(userGlobalOffsetClock);
|
finalClockSource = userBeatmapOffsetClock = new FramedOffsetClock(userGlobalOffsetClock);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -122,7 +122,7 @@ namespace osu.Game.Beatmaps
|
|||||||
Debug.Assert(userBeatmapOffsetClock != null);
|
Debug.Assert(userBeatmapOffsetClock != null);
|
||||||
Debug.Assert(platformOffsetClock != null);
|
Debug.Assert(platformOffsetClock != null);
|
||||||
|
|
||||||
return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.RateAdjustedOffset + platformOffsetClock.RateAdjustedOffset;
|
return userGlobalOffsetClock.RateAdjustedOffset + userBeatmapOffsetClock.Offset + platformOffsetClock.RateAdjustedOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user