mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Remove unnecessary schedule logic from Apply's local updateState call
There were cases in the editor where rewinding of transforms would leave the `DrawableHitObject` in a non-`IsPresent` state, resulting in this scheduled logic never running. This would in turn cause ghost hitobjects, which disappear under certain circumstances. Reproduction: - Open editor to empty beatmap - Place single hitcircle at current point in time - Drag editor timeline backwards to seek before zero, and wait for return to zero - Select hitcircle in playfield - Drag hitcircle to right in timeline, triggering a start time change
This commit is contained in:
parent
c0c197501e
commit
18bb0cb45b
@ -263,10 +263,8 @@ 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);
|
||||
@ -274,7 +272,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
updateState(ArmedState.Miss, true);
|
||||
else
|
||||
updateState(ArmedState.Idle, true);
|
||||
});
|
||||
}
|
||||
|
||||
hasHitObjectApplied = true;
|
||||
|
Loading…
Reference in New Issue
Block a user