diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-21 10:05:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-21 10:05:53 +0100 |
commit | 83c3cba64098fd11d3a4527ec7e3f5e19854cb29 (patch) | |
tree | 10676ea7f6a6f6d1e8ccd7023682324724f34be5 /scene | |
parent | f3cb236f9d0e559e759dabc7cb5b6c1368d45e6e (diff) | |
parent | 21bad78bd82061f0e71bd52cf1ab783974b6031b (diff) |
Merge pull request #24508 from guilhermefelipecgs/fix_22756
Fixes for TileSetEditor and TileMapEditor
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/tile_map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index ee76a90019..0f2d69e0f3 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -840,7 +840,7 @@ void TileMap::update_cell_bitmask(int p_x, int p_y) { Map<PosKey, Cell>::Element *E = tile_map.find(p); if (E != NULL) { int id = get_cell(p_x, p_y); - if (tile_set->tile_get_tile_mode(id) == TileSet::AUTO_TILE || tile_set->tile_get_tile_mode(id) == TileSet::ATLAS_TILE) { + if (tile_set->tile_get_tile_mode(id) == TileSet::AUTO_TILE) { uint16_t mask = 0; if (tile_set->autotile_get_bitmask_mode(id) == TileSet::BITMASK_2X2) { if (tile_set->is_tile_bound(id, get_cell(p_x - 1, p_y - 1)) && tile_set->is_tile_bound(id, get_cell(p_x, p_y - 1)) && tile_set->is_tile_bound(id, get_cell(p_x - 1, p_y))) { @@ -904,7 +904,8 @@ void TileMap::update_cell_bitmask(int p_x, int p_y) { PosKey qk(p_x / _get_quadrant_size(), p_y / _get_quadrant_size()); Map<PosKey, Quadrant>::Element *Q = quadrant_map.find(qk); _make_quadrant_dirty(Q); - } else { + + } else if (tile_set->tile_get_tile_mode(id) == TileSet::SINGLE_TILE) { E->get().autotile_coord_x = 0; E->get().autotile_coord_y = 0; } |