diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
index 61937a535c..b0010ccbf6 100644
--- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
+++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs
@@ -72,7 +72,8 @@ namespace osu.Game.Rulesets.Osu.UI
DrawableOsuJudgement explosion = new DrawableOsuJudgement(result, judgedObject)
{
Origin = Anchor.Centre,
- Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition
+ Position = ((OsuHitObject)judgedObject.HitObject).StackedEndPosition,
+ Scale = new Vector2(((OsuHitObject)judgedObject.HitObject).Scale * 1.65f)
};
judgementLayer.Add(explosion);
diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs
index 2a31df462e..723bb90e7e 100644
--- a/osu.Game/Database/ArchiveModelManager.cs
+++ b/osu.Game/Database/ArchiveModelManager.cs
@@ -282,17 +282,19 @@ namespace osu.Game.Database
/// Is a no-op for already deleted items.
///
/// The item to delete.
- public void Delete(TModel item)
+ /// false if no operation was performed
+ public bool Delete(TModel item)
{
using (ContextFactory.GetForWrite())
{
// re-fetch the model on the import context.
- var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).First(s => s.ID == item.ID);
+ var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).FirstOrDefault(s => s.ID == item.ID);
- if (foundModel.DeletePending) return;
+ if (foundModel == null || foundModel.DeletePending) return false;
if (ModelStore.Delete(foundModel))
Files.Dereference(foundModel.Files.Select(f => f.FileInfo).ToArray());
+ return true;
}
}
diff --git a/osu.Game/IPC/ArchiveImportIPCChannel.cs b/osu.Game/IPC/ArchiveImportIPCChannel.cs
index 6783b9712c..fa8168c1de 100644
--- a/osu.Game/IPC/ArchiveImportIPCChannel.cs
+++ b/osu.Game/IPC/ArchiveImportIPCChannel.cs
@@ -37,7 +37,7 @@ namespace osu.Game.IPC
return;
}
- if (importer.HandledExtensions.Contains(Path.GetExtension(path)))
+ if (importer.HandledExtensions.Contains(Path.GetExtension(path)?.ToLowerInvariant()))
importer.Import(path);
}
}
diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index 9a5dac35b9..73c970ce5d 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -154,7 +154,7 @@ namespace osu.Game
dependencies.Cache(RulesetStore = new RulesetStore(contextFactory));
dependencies.Cache(FileStore = new FileStore(contextFactory, Host.Storage));
dependencies.Cache(BeatmapManager = new BeatmapManager(Host.Storage, contextFactory, RulesetStore, api, Audio, Host));
- dependencies.Cache(ScoreStore = new ScoreStore(Host.Storage, contextFactory, Host, BeatmapManager, RulesetStore));
+ dependencies.Cache(ScoreStore = new ScoreStore(contextFactory, Host, BeatmapManager, RulesetStore));
dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore));
dependencies.Cache(SettingsStore = new SettingsStore(contextFactory));
dependencies.Cache(RulesetConfigCache = new RulesetConfigCache(SettingsStore));
@@ -243,7 +243,7 @@ namespace osu.Game
public void Import(params string[] paths)
{
- var extension = Path.GetExtension(paths.First());
+ var extension = Path.GetExtension(paths.First())?.ToLowerInvariant();
foreach (var importer in fileImporters)
if (importer.HandledExtensions.Contains(extension)) importer.Import(paths);
diff --git a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs
index 65b2ef75c4..c2a52e5794 100644
--- a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs
+++ b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs
@@ -65,13 +65,15 @@ namespace osu.Game.Rulesets.Judgements
this.FadeInFromZero(100, Easing.OutQuint);
+ var origScale = Scale;
+
switch (Result.Type)
{
case HitResult.None:
break;
case HitResult.Miss:
- this.ScaleTo(1.6f);
- this.ScaleTo(1, 100, Easing.In);
+ this.ScaleTo(origScale * 1.6f);
+ this.ScaleTo(origScale, 100, Easing.In);
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);
this.RotateTo(40, 800, Easing.InQuint);
@@ -79,8 +81,8 @@ namespace osu.Game.Rulesets.Judgements
this.Delay(600).FadeOut(200);
break;
default:
- this.ScaleTo(0.9f);
- this.ScaleTo(1, 500, Easing.OutElastic);
+ this.ScaleTo(origScale * 0.9f);
+ this.ScaleTo(origScale, 500, Easing.OutElastic);
this.Delay(100).FadeOut(400);
break;
diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs
index 69d25fcb67..091cb29a71 100644
--- a/osu.Game/Rulesets/Scoring/ScoreStore.cs
+++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs
@@ -3,6 +3,7 @@
using System;
using System.IO;
+using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.Database;
@@ -13,8 +14,6 @@ namespace osu.Game.Rulesets.Scoring
{
public class ScoreStore : DatabaseBackedStore, ICanAcceptFiles
{
- private readonly Storage storage;
-
private readonly BeatmapManager beatmaps;
private readonly RulesetStore rulesets;
@@ -25,9 +24,8 @@ namespace osu.Game.Rulesets.Scoring
// ReSharper disable once NotAccessedField.Local (we should keep a reference to this so it is not finalised)
private ScoreIPCChannel ipc;
- public ScoreStore(Storage storage, DatabaseContextFactory factory, IIpcHost importHost = null, BeatmapManager beatmaps = null, RulesetStore rulesets = null) : base(factory)
+ public ScoreStore(DatabaseContextFactory factory, IIpcHost importHost = null, BeatmapManager beatmaps = null, RulesetStore rulesets = null) : base(factory)
{
- this.storage = storage;
this.beatmaps = beatmaps;
this.rulesets = rulesets;
@@ -49,8 +47,14 @@ namespace osu.Game.Rulesets.Scoring
public Score ReadReplayFile(string replayFilename)
{
- using (Stream s = storage.GetStream(Path.Combine(replay_folder, replayFilename)))
- return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(s);
+ if (File.Exists(replayFilename))
+ {
+ using (var stream = File.OpenRead(replayFilename))
+ return new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream);
+ }
+
+ Logger.Log($"Replay file {replayFilename} cannot be found", LoggingTarget.Information, LogLevel.Error);
+ return null;
}
}
}
diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs
index efdf55e477..b4dcbcce41 100644
--- a/osu.Game/Screens/Select/SongSelect.cs
+++ b/osu.Game/Screens/Select/SongSelect.cs
@@ -536,7 +536,7 @@ namespace osu.Game.Screens.Select
private void delete(BeatmapSetInfo beatmap)
{
- if (beatmap == null) return;
+ if (beatmap == null || beatmap.ID <= 0) return;
dialogOverlay?.Push(new BeatmapDeleteDialog(beatmap));
}