v3.1.0: fixed sad ghost rarely spawning in non-open spaces
This commit is contained in:
+1
-1
@@ -306,7 +306,7 @@ public class Ghost extends NPC {
|
|||||||
Ghost ghost = new Ghost();
|
Ghost ghost = new Ghost();
|
||||||
do {
|
do {
|
||||||
ghost.pos = level.pointToCell(room.random());
|
ghost.pos = level.pointToCell(room.random());
|
||||||
} while (ghost.pos == -1 || level.solid[ghost.pos] || ghost.pos == level.exit());
|
} while (ghost.pos == -1 || level.solid[ghost.pos] || !level.openSpace[ghost.pos] || ghost.pos == level.exit());
|
||||||
level.mobs.add( ghost );
|
level.mobs.add( ghost );
|
||||||
|
|
||||||
spawned = true;
|
spawned = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user