From efd8d3b1e33dc11a9fac6d72e4bba5ecc35ad795 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 18 Sep 2019 00:34:25 -0400 Subject: [PATCH] v0.7.5: fixed hero not being able to open chests while standing on them --- .../shatteredpixeldungeon/actors/hero/Hero.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 363645306..5a80ad689 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -1546,7 +1546,7 @@ public class Hero extends Char { int doorCell = ((HeroAction.Unlock)curAction).dst; int door = Dungeon.level.map[doorCell]; - if (Dungeon.level.adjacent(pos, doorCell)) { + if (Dungeon.level.distance(pos, doorCell) <= 1) { boolean hasKey = true; if (door == Terrain.LOCKED_DOOR) { hasKey = Notes.remove(new IronKey(Dungeon.depth)); @@ -1568,7 +1568,7 @@ public class Hero extends Char { Heap heap = Dungeon.level.heaps.get( ((HeroAction.OpenChest)curAction).dst ); - if (Dungeon.level.adjacent(pos, heap.pos)){ + if (Dungeon.level.distance(pos, heap.pos) <= 1){ boolean hasKey = true; if (heap.type == Type.SKELETON || heap.type == Type.REMAINS) { Sample.INSTANCE.play( Assets.SND_BONES );