8000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Optimizer may change storyboard behavior #12
Open
@Morilli

Description

@Morilli

This part of the code changes commands that have equal start and end time to commands that only contain the end value:

foreach (var hostEvent in host.Events)
{
if (hostEvent.EventType.Size < 1) continue;
if (hostEvent.StartTime.Equals(hostEvent.EndTime) && !hostEvent.IsStartsEqualsEnds())
{
hostEvent.Fill();
for (int i = 0; i < hostEvent.EventType.Size; i++)
{
hostEvent.SetValue(i, hostEvent.GetValue(i + hostEvent.EventType.Size));
}
}
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0