v0.5.0: fixed imp spawning ontop of enemies
This commit is contained in:
parent
040607c927
commit
dc3a2ea907
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user