summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-07-02 10:39:39 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-12-07 18:42:56 -0200
commit69f6f787c07f0c9e6cf1a5a161999585e180533b (patch)
treeda90e0e3d8ea6f9f6d4725be8f8faca071618576 /scene/2d
parent19f2a188bb305c4a446f63a0b5417086b7261514 (diff)
Add Z-Index for Autotile
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/tile_map.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 8fe65f53a9..641cb161ca 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -327,6 +327,10 @@ void TileMap::update_dirty_quadrants() {
Ref<ShaderMaterial> mat = tile_set->tile_get_material(c.id);
int z_index = tile_set->tile_get_z_index(c.id);
+ if (tile_set->tile_get_tile_mode(c.id) == TileSet::AUTO_TILE) {
+ z_index += tile_set->autotile_get_z_index(c.id, Vector2(c.autotile_coord_x, c.autotile_coord_y));
+ }
+
RID canvas_item;
RID debug_canvas_item;