1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-04 16:12:58 +08:00

Update for suggestions

This commit is contained in:
Huo Yaoyuan 2024-12-03 00:03:59 +08:00
parent 68f4fa5a57
commit 7ece8ec1dc
2 changed files with 3 additions and 4 deletions

View File

@ -386,9 +386,8 @@ namespace osu.Game.Overlays
{
channelList.RemoveChannel(channel);
if (loadedChannels.TryGetValue(channel, out var loaded))
if (loadedChannels.Remove(channel, out var loaded))
{
loadedChannels.Remove(channel);
// DrawableChannel removed from cache must be manually disposed
loaded.Dispose();
}

View File

@ -173,10 +173,10 @@ namespace osu.Game.Rulesets.Mods
};
drawable.OnRevertResult += (_, result) =>
{
if (!ratesForRewinding.TryGetValue(result.HitObject, out double rewindValue)) return;
if (!ratesForRewinding.TryGetValue(result.HitObject, out double rate)) return;
if (!shouldProcessResult(result)) return;
recentRates.Insert(0, rewindValue);
recentRates.Insert(0, rate);
ratesForRewinding.Remove(result.HitObject);
recentRates.RemoveAt(recentRates.Count - 1);