1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-20 20:33:21 +08:00

Fix crash from non-serializable hitobject samples

This commit is contained in:
Marvin Schürz 2024-10-11 11:47:23 +02:00
parent 5c74fceff6
commit 7e439be9ec

View File

@ -166,9 +166,6 @@ namespace osu.Game.Rulesets.Osu.Edit
circle.StartTime = startTime;
circle.NewCombo = first && selectionHandler.SelectionNewComboState.Value == TernaryState.True;
// TODO: probably ensure samples also follow current ternary status (not trivial)
circle.Samples.Add(circle.CreateHitSampleInfo());
if (position.X < 0 || position.Y < 0 || position.X > OsuPlayfield.BASE_SIZE.X || position.Y > OsuPlayfield.BASE_SIZE.Y)
{
commitButton.Enabled.Value = false;
@ -178,8 +175,13 @@ namespace osu.Game.Rulesets.Osu.Edit
}
if (!alreadyAdded)
{
newlyAdded.Add(circle);
// TODO: probably ensure samples also follow current ternary status (not trivial)
circle.Samples.Add(circle.CreateHitSampleInfo());
}
startTime = beatSnapProvider.SnapTime(startTime + timeSpacing);
first = false;