mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Revert unnecessary BeatmapManager change
This commit is contained in:
@ -281,9 +281,8 @@ namespace osu.Game.Beatmaps
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="beatmapInfo">The beatmap to lookup.</param>
|
/// <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="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>
|
/// <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)
|
if (beatmapInfo?.ID > 0 && previous != null && previous.BeatmapInfo?.ID == beatmapInfo.ID)
|
||||||
return previous;
|
return previous;
|
||||||
@ -302,14 +301,9 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
lock (workingCache)
|
lock (workingCache)
|
||||||
{
|
{
|
||||||
BeatmapManagerWorkingBeatmap working;
|
var working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
||||||
|
|
||||||
if (!bypassCache)
|
|
||||||
{
|
|
||||||
working = workingCache.FirstOrDefault(w => w.BeatmapInfo?.ID == beatmapInfo.ID);
|
|
||||||
if (working != null)
|
if (working != null)
|
||||||
return working;
|
return working;
|
||||||
}
|
|
||||||
|
|
||||||
beatmapInfo.Metadata ??= beatmapInfo.BeatmapSet.Metadata;
|
beatmapInfo.Metadata ??= beatmapInfo.BeatmapSet.Metadata;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user