From 87b065b8c3c82a365be4a2b9274042480e417a36 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 8 Mar 2024 02:00:23 +0300 Subject: [PATCH] Fix incorrect start time calculations `LoopStartTime` is now baked into each `IStoryboardCommand`. --- osu.Game/Storyboards/StoryboardSprite.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Storyboards/StoryboardSprite.cs b/osu.Game/Storyboards/StoryboardSprite.cs index dfd184a909..fc3c5d343c 100644 --- a/osu.Game/Storyboards/StoryboardSprite.cs +++ b/osu.Game/Storyboards/StoryboardSprite.cs @@ -41,7 +41,7 @@ namespace osu.Game.Storyboards foreach (var loop in loopGroups) { command = loop.Alpha.FirstOrDefault(); - if (command != null) alphaCommands.Add((command.StartTime + loop.LoopStartTime, command.StartValue == 0)); + if (command != null) alphaCommands.Add((command.StartTime, command.StartValue == 0)); } if (alphaCommands.Count > 0) @@ -120,8 +120,6 @@ namespace osu.Game.Storyboards return trigger; } - public override string ToString() => $"{Path}, {Origin}, {InitialPosition}"; - public void ApplyTransforms(Drawable drawable, IEnumerable>? triggeredGroups = null) { // For performance reasons, we need to apply the commands in order by start time. Not doing so will cause many functions to be interleaved, resulting in O(n^2) complexity. @@ -140,6 +138,8 @@ namespace osu.Game.Storyboards } } + public override string ToString() => $"{Path}, {Origin}, {InitialPosition}"; + // todo: need to revisit property initialisation. apparently it has to be done per first command of every affected property (transforms are supposed to do that already?). // private void generateCommands(List resultList, IEnumerable.TypedCommand> commands, // DrawablePropertyInitializer initializeProperty, DrawableTransform transform, bool alwaysInitialize = true)