diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 6c9117892..5325f3c7f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -409,7 +409,7 @@ public class Hero extends Char { } checkVisibleMobs(); - AttackIndicator.updateState(); + if (curAction == null) { @@ -495,6 +495,8 @@ public class Hero extends Char { curAction = null; damageInterrupt = true; ready = true; + + AttackIndicator.updateState(); GameScene.ready(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java index e29e277df..034e18af8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/AttackIndicator.java @@ -69,7 +69,11 @@ public class AttackIndicator extends Tag { public void update() { super.update(); - if (!Dungeon.hero.isAlive()) { + if (Dungeon.hero.isAlive()) { + + enable(Dungeon.hero.ready); + + } else { visible( false ); enable( false ); } @@ -129,6 +133,7 @@ public class AttackIndicator extends Tag { private boolean enabled = true; private void enable( boolean value ) { enabled = value; + active = value; if (sprite != null) { sprite.alpha( value ? ENABLED : DISABLED ); } @@ -143,10 +148,9 @@ public class AttackIndicator extends Tag { @Override protected void onClick() { - if (Dungeon.hero.curAction != null) - Dungeon.hero.interrupt(); - else - Dungeon.hero.handle( lastTarget.pos ); + if (enabled) { + Dungeon.hero.handle( lastTarget.pos ); + } } public static void target( Char target ) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java index 2e4d2b17f..7830a0bcf 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java @@ -98,7 +98,9 @@ public class DangerIndicator extends Tag { HealthIndicator.instance.target( target == HealthIndicator.instance.target() ? null : target ); - Camera.main.target = null; - Camera.main.focusOn( target.sprite ); + if (Dungeon.hero.curAction == null) { + Camera.main.target = null; + Camera.main.focusOn(target.sprite); + } } }