mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Revert unnecessary BeatmapManager change
This commit is contained in:
parent
64579d50ac
commit
22a3f3ad3e
@ -281,9 +281,8 @@ namespace osu.Game.Beatmaps
|
||||
/// </summary>
|
||||
/// <param name="beatmapInfo">The beatmap to lookup.</param>
|
||||
/// <param name="previous">The currently loaded <see cref="WorkingBeatmap"/>. Allows for optimisation where elements are shared with the new beatmap. May be returned if beatmapInfo requested matches</param>
|
||||
/// <param name="bypassCache">Whether to bypass the cache and return a new <see cref="WorkingBeatmap"/> instance.</param>
|
||||
/// <returns>A <see cref="WorkingBeatmap"/> instance correlating to the provided <see cref="BeatmapInfo"/>.</returns>
|
||||
public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo, WorkingBeatmap previous = null, bool bypassCache = false)
|
||||
public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo, WorkingBeatmap previous = null)
|
||||
{
|
||||
if (beatmapInfo?.ID > 0 && previous != null && previous.BeatmapInfo?.ID == beatmapInfo.ID)
|
||||
return previous;
|
||||
@ -302,14 +301,9 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
lock (workingCache)
|
||||
{
|
||||
BeatmapManagerWorkingBeatmap working;
|
||||
|
||||
if (!bypassCache)
|
||||
{
|
||||
working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||
if (working != null)
|
||||
return working;
|
||||
}
|
||||
var working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||
if (working != null)
|
||||
return working;
|
||||
|
||||
beatmapInfo.Metadata ??= beatmapInfo.BeatmapSet.Metadata;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user