From 2f243a403bd91b991a642162b8aa48bd7d6a847b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 10 Jul 2016 14:18:26 -0400 Subject: [PATCH] v0.4.1: cfixed a rare crash bug with prison guards --- .../shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java index 268ec49e9..22e133b87 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Guard.java @@ -90,7 +90,7 @@ public class Guard extends Mob { Ballistica chain = new Ballistica(pos, target, Ballistica.PROJECTILE); - if (chain.collisionPos != enemy.pos || Level.pit[chain.path.get(1)]) + if (chain.collisionPos != enemy.pos || chain.path.size() < 2 || Level.pit[chain.path.get(1)]) return false; else { int newPos = -1;