From 913a5042881e103572f5fdc204c77c6d24de58ce Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 13 Nov 2017 01:43:03 -0500 Subject: [PATCH] v0.6.2c: fixed crashes involving mimic spawning --- .../shatteredpixeldungeon/actors/mobs/Mimic.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java index ad0f94c4d..2f734ba2c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java @@ -112,8 +112,9 @@ public class Mimic extends Mob { } public static Mimic spawnAt( int pos, List items ) { + if (Dungeon.level.pit[pos]) return null; Char ch = Actor.findChar( pos ); - if (ch != null || !Dungeon.level.passable[pos]) { + if (ch != null) { ArrayList candidates = new ArrayList<>(); for (int n : PathFinder.NEIGHBOURS8) { int cell = pos + n;