v0.4.2: fixed a bug with fog of war
This commit is contained in:
parent
47f1c63df3
commit
2f836069ae
|
@ -104,7 +104,7 @@ public class FogOfWar extends Image {
|
||||||
int cell = (pWidth - 1) * i + updating.left;
|
int cell = (pWidth - 1) * i + updating.left;
|
||||||
fog.pixels.position((width2) * i + updating.left);
|
fog.pixels.position((width2) * i + updating.left);
|
||||||
for (int j=updating.left; j < updating.right; j++) {
|
for (int j=updating.left; j < updating.right; j++) {
|
||||||
if (cell < pWidth || cell >= Dungeon.level.length()) {
|
if (cell < pWidth || cell >= Dungeon.level.length() || j == 0 || j == pWidth-1) {
|
||||||
fog.pixels.put(INVISIBLE);
|
fog.pixels.put(INVISIBLE);
|
||||||
} else
|
} else
|
||||||
if (visible[cell] && visible[cell - (pWidth - 1)] &&
|
if (visible[cell] && visible[cell - (pWidth - 1)] &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user