v0.3.1: added a safety check to blazing traps

This commit is contained in:
Evan Debenham 2015-07-23 17:29:36 -04:00
parent 95a3833448
commit 095bff4c1a

View File

@ -43,7 +43,7 @@ public class BlazingTrap extends Trap {
@Override
public void activate() {
for (int i : Level.NEIGHBOURS9DIST2){
if (!Level.solid[pos+i]) {
if (Level.insideMap(pos+i) && !Level.solid[pos+i]) {
if (Level.pit[pos+i] || Level.water[pos+i])
GameScene.add(Blob.seed(pos + i, 1, Fire.class));
else