mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 07:42:58 +08:00
Fix crashes when manually creating sliders
This commit is contained in:
parent
47be95ce0b
commit
e8ce5a7e6c
@ -130,7 +130,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
StartTime = StartTime,
|
||||
Position = Position,
|
||||
Samples = NodeSamples[0],
|
||||
Samples = getNodeSamples(0),
|
||||
SampleControlPoint = SampleControlPoint,
|
||||
IndexInCurrentCombo = IndexInCurrentCombo,
|
||||
ComboIndex = ComboIndex,
|
||||
@ -210,11 +210,18 @@ namespace osu.Game.Rulesets.Osu.Objects
|
||||
Position = Position + Curve.PositionAt(repeat % 2),
|
||||
StackHeight = StackHeight,
|
||||
Scale = Scale,
|
||||
Samples = new List<SampleInfo>(NodeSamples[1 + repeatIndex])
|
||||
Samples = getNodeSamples(1 + repeatIndex)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private List<SampleInfo> getNodeSamples(int nodeIndex)
|
||||
{
|
||||
if (nodeIndex < NodeSamples.Count)
|
||||
return NodeSamples[nodeIndex];
|
||||
return Samples;
|
||||
}
|
||||
|
||||
public override Judgement CreateJudgement() => new OsuJudgement();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user