1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-16 13:32:54 +08:00

Merge pull request #10985 from peppy/fix-editor-disappearing-objects

Remove unnecessary schedule logic from Apply's local updateState call
This commit is contained in:
Bartłomiej Dach 2020-11-29 21:33:27 +01:00 committed by GitHub
commit 57c504d729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,18 +263,15 @@ namespace osu.Game.Rulesets.Objects.Drawables
OnApply();
HitObjectApplied?.Invoke(this);
// If not loaded, the state update happens in LoadComplete(). Otherwise, the update is scheduled to allow for lifetime updates.
// If not loaded, the state update happens in LoadComplete().
if (IsLoaded)
{
Scheduler.Add(() =>
{
if (Result.IsHit)
updateState(ArmedState.Hit, true);
else if (Result.HasResult)
updateState(ArmedState.Miss, true);
else
updateState(ArmedState.Idle, true);
});
if (Result.IsHit)
updateState(ArmedState.Hit, true);
else if (Result.HasResult)
updateState(ArmedState.Miss, true);
else
updateState(ArmedState.Idle, true);
}
hasHitObjectApplied = true;