v0.5.0: fixed imp spawning ontop of enemies

This commit is contained in:
Evan Debenham 2017-02-05 15:04:37 -05:00
parent 040607c927
commit dc3a2ea907

View File

@ -183,7 +183,7 @@ public class Imp extends NPC {
Imp npc = new Imp(); Imp npc = new Imp();
do { do {
npc.pos = level.randomRespawnCell(); npc.pos = level.randomRespawnCell();
} while (npc.pos == -1 || level.heaps.get( npc.pos ) != null); } while (npc.pos == -1 || level.heaps.get( npc.pos ) != null || level.findMob( npc.pos ) != null);
level.mobs.add( npc ); level.mobs.add( npc );
spawned = true; spawned = true;