mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Delay backwards instead of using a millisecond tolerance.
This commit is contained in:
@ -11,11 +11,6 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
public class BeatSyncedContainer : Container
|
||||
{
|
||||
/// <summary>
|
||||
/// A new beat will not be sent if the time since the beat is larger than this tolerance.
|
||||
/// </summary>
|
||||
private const int seek_tolerance = 20;
|
||||
|
||||
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
private int lastBeat;
|
||||
@ -40,10 +35,10 @@ namespace osu.Game.Graphics.Containers
|
||||
if (controlPoint == lastControlPoint && beat == lastBeat)
|
||||
return;
|
||||
|
||||
if ((currentTrackTime - controlPoint.Time) % controlPoint.BeatLength > seek_tolerance)
|
||||
return;
|
||||
double offsetFromBeat = (controlPoint.Time - currentTrackTime) % controlPoint.BeatLength;
|
||||
|
||||
OnNewBeat(beat, controlPoint.BeatLength, controlPoint.TimeSignature, kiai);
|
||||
using (BeginDelayedSequence(offsetFromBeat, true))
|
||||
OnNewBeat(beat, controlPoint.BeatLength, controlPoint.TimeSignature, kiai);
|
||||
|
||||
lastBeat = beat;
|
||||
lastControlPoint = controlPoint;
|
||||
|
Reference in New Issue
Block a user