From 9fb6e86f5bdaf5927407c80200673eeda71757ad Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 11 Aug 2021 14:56:22 -0400 Subject: [PATCH] v0.9.4: fixed crashes caused by Char auras being applied at bad times --- .../shatteredpixeldungeon/sprites/CharSprite.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index ff2b1f44b..03da32af8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -472,7 +472,11 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip size = Math.max(size+4, 16); aura = new Flare(5, size); aura.angularSpeed = 90; - aura.color(color, true).show(this, 0); + aura.color(color, true); + + if (parent != null) { + aura.show(this, 0); + } } public void clearAura(){ @@ -511,6 +515,9 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip marked.visible = visible; } if (aura != null){ + if (aura.parent == null){ + aura.show(this, 0); + } aura.visible = visible; aura.point(center()); }