1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:53:21 +08:00

inherit addition bank from last hitobject

This commit is contained in:
OliBomby 2024-07-04 00:56:53 +02:00
parent 5c2555588d
commit 8f3a30b0b9

View File

@ -158,10 +158,16 @@ namespace osu.Game.Rulesets.Edit
if (AutomaticBankAssignment)
{
// Take the hitnormal sample of the last hit object
var lastHitNormal = getPreviousHitObject()?.Samples?.FirstOrDefault(o => o.Name == HitSampleInfo.HIT_NORMAL);
if (lastHitNormal != null)
HitObject.Samples[0] = lastHitNormal;
// Create samples based on the sample settings of the previous hit object
var lastHitObject = getPreviousHitObject();
if (lastHitObject != null)
{
for (int i = 0; i < HitObject.Samples.Count; i++)
{
HitObject.Samples[i] = lastHitObject.CreateHitSampleInfo(HitObject.Samples[i].Name);
}
}
}
}