1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Always inherit the volume from the previous hit object

This commit is contained in:
OliBomby 2024-07-04 01:09:06 +02:00
parent 5c2555588d
commit e754668daa

View File

@ -163,6 +163,19 @@ namespace osu.Game.Rulesets.Edit
if (lastHitNormal != null)
HitObject.Samples[0] = lastHitNormal;
}
else
{
// Only inherit the volume from the previous hit object
var lastHitNormal = getPreviousHitObject()?.Samples?.FirstOrDefault(o => o.Name == HitSampleInfo.HIT_NORMAL);
if (lastHitNormal != null)
{
for (int i = 0; i < HitObject.Samples.Count; i++)
{
HitObject.Samples[i] = HitObject.Samples[i].With(newVolume: lastHitNormal.Volume);
}
}
}
}
/// <summary>