v0.6.3: fixed further crashes with wall blocking logic
This commit is contained in:
committed by
Evan Debenham
parent
b8f4160a5d
commit
39bfb3c2d8
+2
-3
@@ -77,8 +77,7 @@ public class WallBlockingTilemap extends Tilemap {
|
|||||||
//- There are cells 2x below
|
//- There are cells 2x below
|
||||||
//- The cell below is a wall and visible
|
//- The cell below is a wall and visible
|
||||||
//- All of left, below-left, right, below-right is either a wall or hidden
|
//- All of left, below-left, right, below-right is either a wall or hidden
|
||||||
} else if ( ((cell + 2*mapWidth) < size)
|
} else if ( !fogHidden(cell + mapWidth)
|
||||||
&& !fogHidden(cell + mapWidth)
|
|
||||||
&& (fogHidden(cell - 1) || wall(cell - 1))
|
&& (fogHidden(cell - 1) || wall(cell - 1))
|
||||||
&& (fogHidden(cell + 1) || wall(cell + 1))
|
&& (fogHidden(cell + 1) || wall(cell + 1))
|
||||||
&& (fogHidden(cell - 1 + mapWidth) || wall(cell - 1 + mapWidth))
|
&& (fogHidden(cell - 1 + mapWidth) || wall(cell - 1 + mapWidth))
|
||||||
@@ -178,7 +177,7 @@ public class WallBlockingTilemap extends Tilemap {
|
|||||||
private boolean fogHidden(int cell){
|
private boolean fogHidden(int cell){
|
||||||
if (!Dungeon.level.visited[cell] && !Dungeon.level.mapped[cell]) {
|
if (!Dungeon.level.visited[cell] && !Dungeon.level.mapped[cell]) {
|
||||||
return true;
|
return true;
|
||||||
} else if (wall(cell) && !wall(cell + mapWidth) &&
|
} else if (wall(cell) && cell + mapWidth < size && !wall(cell + mapWidth) &&
|
||||||
!Dungeon.level.visited[cell + mapWidth] && !Dungeon.level.mapped[cell + mapWidth]) {
|
!Dungeon.level.visited[cell + mapWidth] && !Dungeon.level.mapped[cell + mapWidth]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user