1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

fix null sample

This commit is contained in:
OliBomby 2023-04-30 01:08:52 +02:00
parent a6e780a1b9
commit 83111223e0

View File

@ -76,7 +76,8 @@ namespace osu.Game.Rulesets.Edit
{
// Take the hitnormal sample of the last hit object
var lastHitNormal = beatmap.HitObjects.LastOrDefault(h => h.GetEndTime() < HitObject.StartTime)?.Samples?.FirstOrDefault(o => o.Name == HitSampleInfo.HIT_NORMAL);
HitObject.Samples.Add(lastHitNormal);
if (lastHitNormal != null)
HitObject.Samples[0] = lastHitNormal;
placementHandler.BeginPlacement(HitObject);
if (commitStart)