v0.4.1: cfixed a rare crash bug with prison guards

This commit is contained in:
Evan Debenham 2016-07-10 14:18:26 -04:00 committed by Evan Debenham
parent 0da44e62c8
commit 2f243a403b

View File

@ -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;