1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Remove BeatmapInfo field

This commit is contained in:
ColdVolcano 2017-04-24 22:59:33 -05:00
parent 1df50adc3a
commit 51c577624b
2 changed files with 4 additions and 8 deletions

View File

@ -151,8 +151,6 @@ namespace osu.Game.Configuration
Set(OsuConfig.YahooIntegration, false).Disabled = true;
Set(OsuConfig.ForceFrameFlush, false).Disabled = true;
Set(OsuConfig.DetectPerformanceIssues, true).Disabled = true;
Set(OsuConfig.MenuMusic, true).Disabled = true;
Set(OsuConfig.MenuVoice, true).Disabled = true;
Set(OsuConfig.RawInput, false).Disabled = true;
Set(OsuConfig.AbsoluteToOsuWindow, Get<bool>(OsuConfig.RawInput)).Disabled = true;
Set(OsuConfig.ShowMenuTips, true).Disabled = true;
@ -181,7 +179,7 @@ namespace osu.Game.Configuration
Set(OsuConfig.CanForceOptimusCompatibility, true).Disabled = true;
Set(OsuConfig.ConfineMouse, Get<bool>(OsuConfig.ConfineMouseToFullscreen) ?
ConfineMouseMode.Fullscreen : ConfineMouseMode.Never).Disabled = true;
GetOriginalBindable<bool>(OsuConfig.SavePassword).ValueChanged += delegate
{
if (Get<bool>(OsuConfig.SavePassword)) Set(OsuConfig.SaveUsername, true);

View File

@ -63,7 +63,6 @@ namespace osu.Game.Screens.Menu
private Bindable<bool> menuMusic;
private TrackManager trackManager;
private BeatmapInfo beatmap;
private WorkingBeatmap song;
[BackgroundDependencyLoader]
@ -78,8 +77,7 @@ namespace osu.Game.Screens.Menu
int choosableBeatmapsetAmmount = beatmaps.Query<BeatmapSetInfo>().Count();
if (choosableBeatmapsetAmmount > 0)
{
beatmap = beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0];
song = beatmaps.GetWorkingBeatmap(beatmap);
song = beatmaps.GetWorkingBeatmap(beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0]);
Beatmap = song;
}
}
@ -110,8 +108,8 @@ namespace osu.Game.Screens.Menu
Task.Run(() =>
{
trackManager.SetExclusive(song.Track);
song.Track.Seek(beatmap.Metadata.PreviewTime);
if (beatmap.Metadata.PreviewTime == -1)
song.Track.Seek(song.Beatmap.Metadata.PreviewTime);
if (song.Beatmap.Metadata.PreviewTime == -1)
song.Track.Seek(song.Track.Length * .4f);
song.Track.Start();
});