v0.9.1b: fixed rare freezes caused by DM-201 and caustic slime drops

This commit is contained in:
Evan Debenham 2020-12-20 21:01:33 -05:00
parent b61eb8c8a7
commit d64200e907
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class CausticSlime extends Slime {
int ofs;
do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
} while (Dungeon.level.solid[pos + ofs]);
} while (Dungeon.level.solid[pos + ofs] && !Dungeon.level.passable[pos + ofs]);
Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos );
}
}

View File

@ -126,7 +126,7 @@ public class DM201 extends DM200 {
int ofs;
do {
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
} while (Dungeon.level.solid[pos + ofs]);
} while (Dungeon.level.solid[pos + ofs] && !Dungeon.level.passable[pos + ofs]);
Dungeon.level.drop( new MetalShard(), pos + ofs ).sprite.drop( pos );
}