Merge branch 'master' into mania_stage_fix

This commit is contained in:
Dean Herbert 2018-01-22 19:06:00 +09:00 committed by GitHub
commit 76eac9057d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 18 deletions

@ -1 +1 @@
Subproject commit 8f36ddab946ff538620081ede7719461d4732b79
Subproject commit 26c01ca6069296621f76d8ffbfe31ecf8074c687

View File

@ -60,7 +60,10 @@ public DrawableSlider(Slider s)
Samples = s.Samples,
SampleControlPoint = s.SampleControlPoint,
TimePreempt = s.TimePreempt,
TimeFadein = s.TimeFadein
TimeFadein = s.TimeFadein,
HitWindow300 = s.HitWindow300,
HitWindow100 = s.HitWindow100,
HitWindow50 = s.HitWindow50
})
};

View File

@ -16,9 +16,9 @@ public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition
public const double OBJECT_RADIUS = 64;
private const double hittable_range = 300;
private const double hit_window_50 = 150;
private const double hit_window_100 = 80;
private const double hit_window_300 = 30;
public double HitWindow50 = 150;
public double HitWindow100 = 80;
public double HitWindow300 = 30;
public float TimePreempt = 600;
public float TimeFadein = 400;
@ -50,13 +50,13 @@ public double HitWindowFor(HitResult result)
switch (result)
{
default:
return 300;
return hittable_range;
case HitResult.Meh:
return 150;
return HitWindow50;
case HitResult.Good:
return 80;
return HitWindow100;
case HitResult.Great:
return 30;
return HitWindow300;
}
}
@ -78,6 +78,10 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B
TimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450);
TimeFadein = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1200, 800, 300);
HitWindow50 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 200, 150, 100);
HitWindow100 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 140, 100, 60);
HitWindow300 = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 80, 50, 20);
Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2;
}
}

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Allocation;
@ -15,6 +16,7 @@
namespace osu.Game.Tests.Visual
{
[Ignore("CI regularly hangs on this TestCase...")]
public class TestCaseWaveform : OsuTestCase
{
private readonly Bindable<WorkingBeatmap> beatmapBacking = new Bindable<WorkingBeatmap>();

View File

@ -287,15 +287,16 @@ public void Download(BeatmapSetInfo beatmapSetInfo, bool noVideo = false)
Import(archive);
downloadNotification.State = ProgressNotificationState.Completed;
currentDownloads.Remove(request);
}, TaskCreationOptions.LongRunning);
currentDownloads.Remove(request);
};
request.Failure += data =>
request.Failure += error =>
{
if (error is OperationCanceledException) return;
downloadNotification.State = ProgressNotificationState.Completed;
Logger.Error(data, "Failed to get beatmap download information");
Logger.Error(error, "Beatmap download failed!");
currentDownloads.Remove(request);
};

View File

@ -18,7 +18,7 @@ public class ProgressBar : SliderBar<double>
public Color4 FillColour
{
set { fill.Colour = value; }
set { fill.FadeColour(value, 150, Easing.OutQuint); }
}
public Color4 BackgroundColour

View File

@ -16,7 +16,6 @@
using OpenTK.Graphics;
using osu.Framework.Input;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Logging;
using osu.Game.Online.API.Requests;
using osu.Framework.Configuration;
using osu.Framework.Audio.Track;
@ -65,11 +64,14 @@ protected DirectPanel(BeatmapSetInfo setInfo)
Colour = Color4.Black.Opacity(0.3f),
};
private OsuColour colours;
[BackgroundDependencyLoader(permitNulls: true)]
private void load(BeatmapManager beatmaps, OsuColour colours, BeatmapSetOverlay beatmapSetOverlay)
{
this.beatmaps = beatmaps;
this.beatmapSetOverlay = beatmapSetOverlay;
this.colours = colours;
AddInternal(content = new Container
{
@ -106,6 +108,8 @@ private void load(BeatmapManager beatmaps, OsuColour colours, BeatmapSetOverlay
beatmaps.BeatmapDownloadBegan += attachDownload;
}
public override bool DisposeOnDeathRemoval => true;
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
@ -180,7 +184,6 @@ private void attachDownload(DownloadBeatmapSetRequest request)
{
progressBar.Current.Value = 0;
progressBar.FadeOut(500);
Logger.Error(e, "Failed to get beatmap download information");
};
request.DownloadProgressed += progress => progressBar.Current.Value = progress;
@ -188,7 +191,7 @@ private void attachDownload(DownloadBeatmapSetRequest request)
request.Success += data =>
{
progressBar.Current.Value = 1;
progressBar.FadeOut(500);
progressBar.FillColour = colours.Yellow;
};
}

View File

@ -145,6 +145,12 @@ private void updatePreviewTrack(bool playing)
}
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
Playing.Value = false;
}
private TrackLoader trackLoader;
private AudioManager audio;

View File

@ -298,7 +298,7 @@ private void updateSearch()
Task.Run(() =>
{
var onlineIds = response.Select(r => r.OnlineBeatmapSetID).ToList();
var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID)).Select(r => r.OnlineBeatmapSetID).ToList();
var presentOnlineIds = beatmaps.QueryBeatmapSets(s => onlineIds.Contains(s.OnlineBeatmapSetID) && !s.DeletePending).Select(r => r.OnlineBeatmapSetID).ToList();
var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList();
// may not need scheduling; loads async internally.