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:
parent
5c2555588d
commit
e754668daa
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user