From 8f3a30b0b9ba86adfd6b8c0690fc716608abad2c Mon Sep 17 00:00:00 2001 From: OliBomby Date: Thu, 4 Jul 2024 00:56:53 +0200 Subject: [PATCH] inherit addition bank from last hitobject --- osu.Game/Rulesets/Edit/PlacementBlueprint.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game/Rulesets/Edit/PlacementBlueprint.cs b/osu.Game/Rulesets/Edit/PlacementBlueprint.cs index 5cb9adfd72..762a714088 100644 --- a/osu.Game/Rulesets/Edit/PlacementBlueprint.cs +++ b/osu.Game/Rulesets/Edit/PlacementBlueprint.cs @@ -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); + } + } } }