diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index dc2d8defd..170522b92 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -630,12 +630,12 @@ public abstract class Level implements Bundlable { } //an open space is large enough to fit large mobs. A space is open when it is not solid - // and there is a group of 3 or more adjacent cells which aren't solid + // and there is and open corner with both adjacent cells opens for (int i=0; i < length(); i++) { if (solid[i]){ openSpace[i] = false; } else { - for (int j = 0; j < PathFinder.CIRCLE8.length; j++){ + for (int j = 1; j < PathFinder.CIRCLE8.length; j += 2){ if (solid[i+PathFinder.CIRCLE8[j]]) { openSpace[i] = false; } else if (!solid[i+PathFinder.CIRCLE8[(j+1)%8]] diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java index 2518edc47..9adfddde5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java @@ -107,13 +107,12 @@ public class DangerIndicator extends Tag { protected void onClick() { if (Dungeon.hero.visibleEnemies() > 0) { - Mob target = Dungeon.hero.visibleEnemy(enemyIndex++); + Mob target = Dungeon.hero.visibleEnemy(++enemyIndex); - TargetHealthIndicator.instance.target(target == TargetHealthIndicator.instance.target() ? null : target); + QuickSlotButton.target(target); + if (Dungeon.hero.canAttack(target)) AttackIndicator.target(target); - if (Dungeon.hero.curAction == null) { - Camera.main.panTo(target.sprite.center(), 5f); - } + if (Dungeon.hero.curAction == null) Camera.main.panTo(target.sprite.center(), 5f); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java index 3b98fbd07..10ddfc2e8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/LootIndicator.java @@ -41,12 +41,7 @@ public class LootIndicator extends Tag { visible = false; } - - @Override - public GameAction keyAction() { - return SPDAction.TAG_LOOT; - } - + @Override protected void createChildren() { super.createChildren(); @@ -58,6 +53,11 @@ public class LootIndicator extends Tag { } } + + @Override + public GameAction keyAction() { + return SPDAction.TAG_LOOT; + } }; slot.showParams( true, false, false ); add( slot );