Fix invalid tile coordinates in GameMap.setTile() method
This commit is contained in:
@@ -39,9 +39,9 @@ public class GameMap {
|
|||||||
Arrays.fill(passageMap, 0, rows * cols, PassageAbility.ALLOW);
|
Arrays.fill(passageMap, 0, rows * cols, PassageAbility.ALLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTile(int layer, int row, int col, Tile tile) {
|
public void setTile(int layer, int row, int col, Tile tile) {
|
||||||
recalculateTileGeometry(tile, row, col);
|
recalculateTileGeometry(tile, col, row);
|
||||||
map[layer][row * cols + col] = tile;
|
map[layer][col * cols + row] = tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recalculateTileGeometry(Tile tile, int i, int j) {
|
private void recalculateTileGeometry(Tile tile, int i, int j) {
|
||||||
|
|||||||
Reference in New Issue
Block a user