From fbaae94ba44959d0f22e018429ca04e28a7c2862 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 2 Nov 2016 12:31:51 +0900 Subject: [PATCH] Limit state changes to apply only once. --- osu.Game/Beatmaps/Objects/DrawableHitObject.cs | 1 + osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/osu.Game/Beatmaps/Objects/DrawableHitObject.cs b/osu.Game/Beatmaps/Objects/DrawableHitObject.cs index d6b459b0d1..27826008cf 100644 --- a/osu.Game/Beatmaps/Objects/DrawableHitObject.cs +++ b/osu.Game/Beatmaps/Objects/DrawableHitObject.cs @@ -31,6 +31,7 @@ namespace osu.Game.Beatmaps.Objects set { + if (state == value) return; state = value; UpdateState(state); diff --git a/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs b/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs index 5449c645e8..335f4d6103 100644 --- a/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs +++ b/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs @@ -70,6 +70,14 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable approachCircle.Texture = game.Textures.Get(@"Play/osu/approachcircle@2x"); } + protected override void LoadComplete() + { + base.LoadComplete(); + + //force application of the state that was set before we loaded. + UpdateState(State); + } + protected override void UpdateState(ArmedState state) { if (!IsLoaded) return;