1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 11:12:59 +08:00

Merge branch 'master' into fix-multimod-copy

This commit is contained in:
Dean Herbert 2020-10-14 22:29:38 +09:00 committed by GitHub
commit 8b864c8c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -307,12 +307,7 @@ namespace osu.Game.Beatmaps.Formats
double start = getOffsetTime(Parsing.ParseDouble(split[1])); double start = getOffsetTime(Parsing.ParseDouble(split[1]));
double end = Math.Max(start, getOffsetTime(Parsing.ParseDouble(split[2]))); double end = Math.Max(start, getOffsetTime(Parsing.ParseDouble(split[2])));
var breakEvent = new BreakPeriod(start, end); beatmap.Breaks.Add(new BreakPeriod(start, end));
if (!breakEvent.HasEffect)
return;
beatmap.Breaks.Add(breakEvent);
break; break;
} }
} }

View File

@ -28,7 +28,7 @@ namespace osu.Game.Beatmaps.Timing
public double Duration => EndTime - StartTime; public double Duration => EndTime - StartTime;
/// <summary> /// <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> /// </summary>
public bool HasEffect => Duration >= MIN_BREAK_DURATION; public bool HasEffect => Duration >= MIN_BREAK_DURATION;

View File

@ -107,6 +107,9 @@ namespace osu.Game.Rulesets.Mods
{ {
foreach (var breakPeriod in Breaks) foreach (var breakPeriod in Breaks)
{ {
if (!breakPeriod.HasEffect)
continue;
if (breakPeriod.Duration < FLASHLIGHT_FADE_DURATION * 2) continue; if (breakPeriod.Duration < FLASHLIGHT_FADE_DURATION * 2) continue;
this.Delay(breakPeriod.StartTime + FLASHLIGHT_FADE_DURATION).FadeOutFromOne(FLASHLIGHT_FADE_DURATION); this.Delay(breakPeriod.StartTime + FLASHLIGHT_FADE_DURATION).FadeOutFromOne(FLASHLIGHT_FADE_DURATION);