mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Revert "Change BeatmapInfo
copy logic to be opt-in rather than opt-out"
This reverts commit 5dabc9282c
.
This commit is contained in:
parent
5dabc9282c
commit
7e75fa7117
@ -131,28 +131,13 @@ namespace osu.Game.Beatmaps
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newBeatmap = referenceBeatmap.Clone();
|
newBeatmap = referenceBeatmap.Clone();
|
||||||
|
newBeatmap.BeatmapInfo = newBeatmapInfo = referenceBeatmap.BeatmapInfo.Clone();
|
||||||
var referenceBeatmapInfo = referenceBeatmap.BeatmapInfo;
|
// assign a new ID to the clone.
|
||||||
newBeatmap.BeatmapInfo = newBeatmapInfo = new BeatmapInfo(referenceBeatmapInfo.Ruleset, referenceBeatmapInfo.Difficulty.Clone(), referenceBeatmapInfo.Metadata.DeepClone())
|
newBeatmapInfo.ID = Guid.NewGuid();
|
||||||
{
|
// clear difficulty name to avoid clashes on save.
|
||||||
// Only selected appropriate properties are copied over.
|
newBeatmapInfo.DifficultyName = string.Empty;
|
||||||
// Things like database ID, online status/ID, MD5 hash, star rating, etc. are omitted
|
// also clear the hash, as that's what is used to match .osu files with their corresponding realm beatmaps.
|
||||||
// because they should not be copied over and/or they will be recomputed on save.
|
newBeatmapInfo.Hash = string.Empty;
|
||||||
AudioLeadIn = referenceBeatmapInfo.AudioLeadIn,
|
|
||||||
StackLeniency = referenceBeatmapInfo.StackLeniency,
|
|
||||||
SpecialStyle = referenceBeatmapInfo.SpecialStyle,
|
|
||||||
LetterboxInBreaks = referenceBeatmapInfo.LetterboxInBreaks,
|
|
||||||
WidescreenStoryboard = referenceBeatmapInfo.WidescreenStoryboard,
|
|
||||||
EpilepsyWarning = referenceBeatmapInfo.EpilepsyWarning,
|
|
||||||
SamplesMatchPlaybackRate = referenceBeatmapInfo.SamplesMatchPlaybackRate,
|
|
||||||
DistanceSpacing = referenceBeatmapInfo.DistanceSpacing,
|
|
||||||
BeatDivisor = referenceBeatmapInfo.BeatDivisor,
|
|
||||||
GridSize = referenceBeatmapInfo.GridSize,
|
|
||||||
TimelineZoom = referenceBeatmapInfo.TimelineZoom,
|
|
||||||
Countdown = referenceBeatmapInfo.Countdown,
|
|
||||||
CountdownOffset = referenceBeatmapInfo.CountdownOffset,
|
|
||||||
Bookmarks = (int[])referenceBeatmapInfo.Bookmarks.Clone()
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// populate circular beatmap set info <-> beatmap info references manually.
|
// populate circular beatmap set info <-> beatmap info references manually.
|
||||||
|
Loading…
Reference in New Issue
Block a user