Description
This part of the code changes commands that have equal start and end time to commands that only contain the end value:
Coosu/Coosu.Storyboard.Extensions/Optimizing/SpriteCompressor.cs
Lines 347 to 358 in e8b95ae
This can change storyboard behavior though and is therefore not a safe optimization:
Let's say you have a sprite that has a move command from time 0
to 1000
and a fade command from time 500
to 500
(so 0 duration) from 1
to 0
opacity.
This sprite will be visible for 500 milliseconds and then become invisible due to the instant fade command. If that fade command is changed to a durationless command with starttime 500
and just the end opacity of 0
, the sprite will instead be permanently invisible for its entire lifetime.
I am unsure whether this is a bug in osu! itself because this behavior certainly does not sound right, but assuming that it has been this way for a long time and wasn't a recent change, the optimizer should not change such commands that could break storyboard behavior.