v0.8.0: fixed rare crash errors with spinners and blast wave effects

This commit is contained in:
Evan Debenham 2019-12-14 12:17:48 -05:00
parent b23a091ed6
commit d726efb948
2 changed files with 8 additions and 1 deletions

View File

@ -159,6 +159,11 @@ public class Spinner extends Mob {
}
}
//in case target is at the edge of the map and there are no more cells in the path
if (b.path.size() <= collisionIndex){
return -1;
}
int webPos = b.path.get( collisionIndex+1 );
if (Dungeon.level.passable[webPos]){

View File

@ -135,6 +135,8 @@ public class WandOfBlastWave extends DamageWand {
collided = true;
}
if (dist < 0) return;
final int newPos = trajectory.path.get(dist);
if (newPos == ch.pos) return;