diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-04 10:05:58 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-04 10:05:58 +0100 |
commit | 05ce0e3de1d4f49ad447e682f16c6a9b62345b0d (patch) | |
tree | 3988403a182921534b3b3ac2a681aea9388fb33e | |
parent | a13d7a3717c501faa0b722adde5393b2a780bb75 (diff) | |
parent | ffacb31734e89e3d94b88f0681004e4b230b3d2c (diff) |
Merge pull request #68222 from groud/fix_corner_terrain_painting
Fix terrain painting in corner-only matching mode
-rw-r--r-- | scene/2d/tile_map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index f7a66215b2..40e8818262 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -2440,7 +2440,7 @@ HashMap<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_fill_connect(int p_ // Find the adequate neighbor for (int j = 0; j < TileSet::CELL_NEIGHBOR_MAX; j++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(j); - if (tile_set->is_valid_terrain_peering_bit(p_terrain_set, bit)) { + if (is_existing_neighbor(bit)) { Vector2i neighbor = get_neighbor_cell(coords, bit); if (!can_modify_set.has(neighbor)) { can_modify_list.push_back(neighbor); @@ -2538,7 +2538,7 @@ HashMap<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_fill_path(int p_lay TileSet::CellNeighbor found_bit = TileSet::CELL_NEIGHBOR_MAX; for (int j = 0; j < TileSet::CELL_NEIGHBOR_MAX; j++) { TileSet::CellNeighbor bit = TileSet::CellNeighbor(j); - if (tile_set->is_valid_terrain_peering_bit(p_terrain_set, bit)) { + if (is_existing_neighbor(bit)) { if (get_neighbor_cell(p_path[i], bit) == p_path[i + 1]) { found_bit = bit; break; |