v0.9.4: fixed crashes caused by Char auras being applied at bad times

This commit is contained in:
Evan Debenham 2021-08-11 14:56:22 -04:00
parent cd148002df
commit 9fb6e86f5b

View File

@ -472,7 +472,11 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
size = Math.max(size+4, 16); size = Math.max(size+4, 16);
aura = new Flare(5, size); aura = new Flare(5, size);
aura.angularSpeed = 90; aura.angularSpeed = 90;
aura.color(color, true).show(this, 0); aura.color(color, true);
if (parent != null) {
aura.show(this, 0);
}
} }
public void clearAura(){ public void clearAura(){
@ -511,6 +515,9 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
marked.visible = visible; marked.visible = visible;
} }
if (aura != null){ if (aura != null){
if (aura.parent == null){
aura.show(this, 0);
}
aura.visible = visible; aura.visible = visible;
aura.point(center()); aura.point(center());
} }