aboutsummaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJames Beedie2018-06-01 17:12:25 -0400
committerJames Beedie2018-06-02 21:25:09 -0400
commit6cbafdea163e96ef81df33f1ed7451484c535f43 (patch)
treee339d8aa80aadf2f655097e5a0214462a0f145cc /scene
parent1820f9752dd258f81d18e2940a9a9d1c13216985 (diff)
downloadgodot-6cbafdea163e96ef81df33f1ed7451484c535f43.tar.gz
godot-6cbafdea163e96ef81df33f1ed7451484c535f43.tar.zst
godot-6cbafdea163e96ef81df33f1ed7451484c535f43.zip
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/tile_map.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index d88e148b2..050a3f245 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -977,6 +977,14 @@ void TileMap::set_cell_autotile_coord(int p_x, int p_y, const Vector2 &p_coord)
c.autotile_coord_x = p_coord.x;
c.autotile_coord_y = p_coord.y;
tile_map[pk] = c;
+
+ PosKey qk(p_x / _get_quadrant_size(), p_y / _get_quadrant_size());
+ Map<PosKey, Quadrant>::Element *Q = quadrant_map.find(qk);
+
+ if (!Q)
+ return;
+
+ _make_quadrant_dirty(Q);
}
Vector2 TileMap::get_cell_autotile_coord(int p_x, int p_y) const {