1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 09:42:54 +08:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Dan Balasescu
ef2b625d9a
Merge pull request #8202 from peppy/remove-tiny-droplet-samples
Don't play samples on catching a tiny droplet
2020-03-11 13:26:15 +09:00
Dan Balasescu
34629fe974
Merge pull request #8206 from peppy/fix-cross-thread-operation
Fix download failures potentially crashing game
2020-03-11 13:19:36 +09:00
Dan Balasescu
df52b58543
Merge branch 'master' into remove-tiny-droplet-samples 2020-03-11 12:46:16 +09:00
Dan Balasescu
afcbc5b789
Merge branch 'master' into fix-cross-thread-operation 2020-03-11 12:45:18 +09:00
Dean Herbert
ad7cda8735 Fix download failures causing a non-safe drawable change 2020-03-10 20:11:06 +09:00
Dean Herbert
14192c069f Don't play samples on catching a tiny droplet 2020-03-10 18:05:44 +09:00
3 changed files with 8 additions and 7 deletions

View File

@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Catch.Objects
{
base.CreateNestedHitObjects();
var tickSamples = Samples.Select(s => new HitSampleInfo
var dropletSamples = Samples.Select(s => new HitSampleInfo
{
Bank = s.Bank,
Name = @"slidertick",
@ -75,7 +75,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
AddNested(new TinyDroplet
{
Samples = tickSamples,
StartTime = t + lastEvent.Value.Time,
X = X + Path.PositionAt(
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X / CatchPlayfield.BASE_WIDTH,
@ -93,7 +92,7 @@ namespace osu.Game.Rulesets.Catch.Objects
case SliderEventType.Tick:
AddNested(new Droplet
{
Samples = tickSamples,
Samples = dropletSamples,
StartTime = e.Time,
X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH,
});

View File

@ -15,11 +15,13 @@ namespace osu.Game.Database
{
/// <summary>
/// Fired when a <typeparamref name="TModel"/> download begins.
/// This is NOT run on the update thread and should be scheduled.
/// </summary>
event Action<ArchiveDownloadRequest<TModel>> DownloadBegan;
/// <summary>
/// Fired when a <typeparamref name="TModel"/> download is interrupted, either due to user cancellation or failure.
/// This is NOT run on the update thread and should be scheduled.
/// </summary>
event Action<ArchiveDownloadRequest<TModel>> DownloadFailed;

View File

@ -53,17 +53,17 @@ namespace osu.Game.Online
manager.ItemRemoved += itemRemoved;
}
private void downloadBegan(ArchiveDownloadRequest<TModel> request)
private void downloadBegan(ArchiveDownloadRequest<TModel> request) => Schedule(() =>
{
if (request.Model.Equals(Model.Value))
attachDownload(request);
}
});
private void downloadFailed(ArchiveDownloadRequest<TModel> request)
private void downloadFailed(ArchiveDownloadRequest<TModel> request) => Schedule(() =>
{
if (request.Model.Equals(Model.Value))
attachDownload(null);
}
});
private ArchiveDownloadRequest<TModel> attachedRequest;