v0.9.0: Fixed spinners shooting webs through walls

This commit is contained in:
Evan Debenham 2020-09-07 17:45:47 -04:00
parent 557d4e9d7e
commit 4ed1a33cb0

View File

@ -169,8 +169,11 @@ public class Spinner extends Mob {
} }
int webPos = b.path.get( collisionIndex+1 ); int webPos = b.path.get( collisionIndex+1 );
//ensure we aren't shooting the web through walls
int projectilePos = new Ballistica( pos, webPos, Ballistica.STOP_TARGET | Ballistica.STOP_TERRAIN).collisionPos;
if (Dungeon.level.passable[webPos]){ if (projectilePos == webPos && Dungeon.level.passable[webPos]){
return webPos; return webPos;
} else { } else {
return -1; return -1;