v0.5.0: fixed distance visibility not updating properly in some cases

This commit is contained in:
Evan Debenham 2016-12-20 19:13:11 -05:00
parent 9cb91026a6
commit 591b96fb81

View File

@ -697,6 +697,12 @@ public class Dungeon {
level.updateFieldOfView(hero, visible);
if (hero.buff(MindVision.class) != null || hero.buff(Awareness.class) != null) {
BArray.or( level.visited, visible, 0, visible.length, level.visited );
GameScene.updateFog();
} else {
int cx = hero.pos % level.width();
int cy = hero.pos / level.width();
@ -707,14 +713,14 @@ public class Dungeon {
int len = bx - ax + 1;
int pos = ax + ay * level.width();
for (int y = ay; y <= by; y++, pos+=level.width()) {
BArray.or( level.visited, visible, pos, len, level.visited );
}
if (hero.buff(MindVision.class) != null || hero.buff(Awareness.class) != null)
GameScene.updateFog();
else
GameScene.updateFog(ax, ay, len, by-ay);
}
GameScene.afterObserve();
}