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

View File

@ -263,18 +263,15 @@ namespace osu.Game.Rulesets.Objects.Drawables
OnApply(); OnApply();
HitObjectApplied?.Invoke(this); 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) if (IsLoaded)
{ {
Scheduler.Add(() => if (Result.IsHit)
{ updateState(ArmedState.Hit, true);
if (Result.IsHit) else if (Result.HasResult)
updateState(ArmedState.Hit, true); updateState(ArmedState.Miss, true);
else if (Result.HasResult) else
updateState(ArmedState.Miss, true); updateState(ArmedState.Idle, true);
else
updateState(ArmedState.Idle, true);
});
} }
hasHitObjectApplied = true; hasHitObjectApplied = true;