mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Merge pull request #10451 from smoogipoo/fix-early-break-cull
Fix breaks being culled during beatmap parsing
This commit is contained in:
commit
205c6606a7
@ -307,12 +307,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
double start = getOffsetTime(Parsing.ParseDouble(split[1]));
|
||||
double end = Math.Max(start, getOffsetTime(Parsing.ParseDouble(split[2])));
|
||||
|
||||
var breakEvent = new BreakPeriod(start, end);
|
||||
|
||||
if (!breakEvent.HasEffect)
|
||||
return;
|
||||
|
||||
beatmap.Breaks.Add(breakEvent);
|
||||
beatmap.Breaks.Add(new BreakPeriod(start, end));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Beatmaps.Timing
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the break has any effect. Breaks that are too short are culled before they are added to the beatmap.
|
||||
/// Whether the break has any effect.
|
||||
/// </summary>
|
||||
public bool HasEffect => Duration >= MIN_BREAK_DURATION;
|
||||
|
||||
|
@ -107,6 +107,9 @@ namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
foreach (var breakPeriod in Breaks)
|
||||
{
|
||||
if (!breakPeriod.HasEffect)
|
||||
continue;
|
||||
|
||||
if (breakPeriod.Duration < FLASHLIGHT_FADE_DURATION * 2) continue;
|
||||
|
||||
this.Delay(breakPeriod.StartTime + FLASHLIGHT_FADE_DURATION).FadeOutFromOne(FLASHLIGHT_FADE_DURATION);
|
||||
|
Loading…
Reference in New Issue
Block a user