mirror of https://github.com/ppy/osu
Fix taiko editor not unapplying slider multiplier changes on save
This commit is contained in:
parent
d88fd1bfd7
commit
540b7e1b38
|
@ -209,7 +209,7 @@ public override void CopyTo(BeatmapDifficulty other)
|
|||
{
|
||||
base.CopyTo(other);
|
||||
if (!(other is TaikoMultiplierAppliedDifficulty))
|
||||
SliderMultiplier /= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
|
||||
other.SliderMultiplier /= LegacyBeatmapEncoder.LEGACY_TAIKO_VELOCITY_MULTIPLIER;
|
||||
}
|
||||
|
||||
public override void CopyFrom(IBeatmapDifficultyInfo other)
|
||||
|
|
|
@ -189,7 +189,11 @@ public virtual void Save(BeatmapInfo beatmapInfo, IBeatmap beatmapContent, ISkin
|
|||
|
||||
// Difficulty settings must be copied first due to the clone in `Beatmap<>.BeatmapInfo_Set`.
|
||||
// This should hopefully be temporary, assuming said clone is eventually removed.
|
||||
beatmapInfo.BaseDifficulty.CopyFrom(beatmapContent.Difficulty);
|
||||
|
||||
// Warning: The directionality here is important. Changes have to be copied *from* beatmapContent (which comes from editor and is being saved)
|
||||
// *to* the beatmapInfo (which is a database model and needs to receive values without the taiko slider velocity multiplier for correct operation).
|
||||
// CopyTo() will undo such adjustments, while CopyFrom() will not.
|
||||
beatmapContent.Difficulty.CopyTo(beatmapInfo.BaseDifficulty);
|
||||
|
||||
// All changes to metadata are made in the provided beatmapInfo, so this should be copied to the `IBeatmap` before encoding.
|
||||
beatmapContent.BeatmapInfo = beatmapInfo;
|
||||
|
|
Loading…
Reference in New Issue