v0.6.0: fixed incorrect visual tile grid on maps with odd dimensions

This commit is contained in:
Evan Debenham 2017-04-01 20:50:55 -04:00
parent 0d3e407da1
commit f19d57443d

View File

@ -43,7 +43,7 @@ public class GridTileMap extends DungeonTilemap {
@Override
protected int getTileVisual(int pos, int tile, boolean flat) {
if (gridSetting == -1 || pos % 2 != (pos / mapWidth) % 2){
if (gridSetting == -1 || (pos % mapWidth) % 2 != (pos / mapWidth) % 2){
return -1;
} else if (DungeonTileSheet.floorTile(tile) || tile == Terrain.HIGH_GRASS) {
return gridSetting;