mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:57:52 +08: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,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;
|
||||||
|
Loading…
Reference in New Issue
Block a user