From 59d9dc5ee74d7ab2988b7fa50cc516d08807b910 Mon Sep 17 00:00:00 2001 From: Damnae Date: Sun, 10 Sep 2017 20:08:56 +0200 Subject: [PATCH] Ignore storyboard sprites with invalid positions. --- osu.Game/Storyboards/Drawables/StoryboardAnimation.cs | 3 +++ osu.Game/Storyboards/Drawables/StoryboardSprite.cs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs b/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs index eb2ba59397..2051b9c4af 100644 --- a/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs +++ b/osu.Game/Storyboards/Drawables/StoryboardAnimation.cs @@ -49,6 +49,9 @@ namespace osu.Game.Storyboards.Drawables } } + public override bool IsPresent + => !float.IsNaN(DrawPosition.X) && !float.IsNaN(DrawPosition.Y) && base.IsPresent; + public StoryboardAnimation(AnimationDefinition definition) { Definition = definition; diff --git a/osu.Game/Storyboards/Drawables/StoryboardSprite.cs b/osu.Game/Storyboards/Drawables/StoryboardSprite.cs index 565b5a5069..ca055fe6d4 100644 --- a/osu.Game/Storyboards/Drawables/StoryboardSprite.cs +++ b/osu.Game/Storyboards/Drawables/StoryboardSprite.cs @@ -49,6 +49,9 @@ namespace osu.Game.Storyboards.Drawables } } + public override bool IsPresent + => !float.IsNaN(DrawPosition.X) && !float.IsNaN(DrawPosition.Y) && base.IsPresent; + public StoryboardSprite(SpriteDefinition definition) { Definition = definition;