v0.9.0: Fixed spinners shooting webs through walls
This commit is contained in:
parent
557d4e9d7e
commit
4ed1a33cb0
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user