v0.6.1b: Levels no longer set Dungeon.visible

This commit is contained in:
Evan Debenham 2017-08-21 00:04:55 -04:00
parent 55151aa0a9
commit 5d1669431d
3 changed files with 7 additions and 4 deletions

View File

@ -261,7 +261,6 @@ public abstract class Level implements Bundlable {
visited = new boolean[length];
mapped = new boolean[length];
Dungeon.visible = new boolean[length];
fieldOfView = new boolean[length()];
@ -527,7 +526,9 @@ public abstract class Level implements Bundlable {
int cell;
do {
cell = Random.Int( length() );
} while (!passable[cell] || Dungeon.visible[cell] || Actor.findChar( cell ) != null);
} while ((Dungeon.level == this && Dungeon.visible[cell])
|| !passable[cell]
|| Actor.findChar( cell ) != null);
return cell;
}
@ -668,7 +669,7 @@ public abstract class Level implements Bundlable {
if (heap == null) {
heap = new Heap();
heap.seen = Dungeon.visible[cell];
heap.seen = Dungeon.level == this && Dungeon.visible[cell];
heap.pos = cell;
if (map[cell] == Terrain.CHASM || (Dungeon.level != null && pit[cell])) {
Dungeon.dropToChasm( item );

View File

@ -254,7 +254,7 @@ public abstract class RegularLevel extends Level {
}
cell = pointToCell(room.random(1));
if (!Dungeon.visible[cell]
if ((Dungeon.level != this || !Dungeon.visible[cell])
&& Actor.findChar( cell ) == null
&& Level.passable[cell]
&& cell != exit) {

View File

@ -85,6 +85,8 @@ public class InterlevelScene extends PixelScene {
phase = Phase.FADE_IN;
timeLeft = TIME_TO_FADE;
Dungeon.visible = null;
thread = new Thread() {
@Override
public void run() {