v2.5.0: fixed ghost questgiver rarely spawning into walls

This commit is contained in:
Evan Debenham
2024-07-26 14:14:28 -04:00
parent b15a2a8636
commit 6217f64f13

View File

@@ -306,7 +306,7 @@ public class Ghost extends NPC {
Ghost ghost = new Ghost();
do {
ghost.pos = level.pointToCell(room.random());
} while (ghost.pos == -1 || ghost.pos == level.exit());
} while (ghost.pos == -1 || level.solid[ghost.pos] || ghost.pos == level.exit());
level.mobs.add( ghost );
spawned = true;