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:
commit
57c504d729
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user