v0.6.2c: fixed crashes involving mimic spawning

This commit is contained in:
Evan Debenham 2017-11-13 01:43:03 -05:00 committed by Evan Debenham
parent 1fbaa27f5b
commit 913a504288

View File

@ -112,8 +112,9 @@ public class Mimic extends Mob {
}
public static Mimic spawnAt( int pos, List<Item> items ) {
if (Dungeon.level.pit[pos]) return null;
Char ch = Actor.findChar( pos );
if (ch != null || !Dungeon.level.passable[pos]) {
if (ch != null) {
ArrayList<Integer> candidates = new ArrayList<>();
for (int n : PathFinder.NEIGHBOURS8) {
int cell = pos + n;