diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-19 21:30:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 21:30:10 +0200 |
commit | 4f640762f7ca0b6e2500b48a07eb1fe868166d9c (patch) | |
tree | 04d88d2928d9286bd2d290142d2c3a27ac996601 /scene/2d | |
parent | 5b306859767d511a02618ae88a4da5fb15c9e202 (diff) | |
parent | a7ace9fec13a984ef50c861aaa890ad2f5c7d4b4 (diff) |
Merge pull request #51881 from KoBeWi/zz__iinnddeexx
Fix z_index applied twice for TileMap layers
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/tile_map.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 74eb3f2fc2..12aa1afc45 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -782,7 +782,7 @@ void TileMap::_rendering_update_dirty_quadrants(SelfList<TileMapQuadrant>::List // Get the tile data. TileData *tile_data = Object::cast_to<TileData>(atlas_source->get_tile_data(c.get_atlas_coords(), c.alternative_tile)); Ref<ShaderMaterial> mat = tile_data->tile_get_material(); - int z_index = layers[q.layer].z_index + tile_data->get_z_index(); + int z_index = tile_data->get_z_index(); // Quandrant pos. Vector2 position = map_to_world(q.coords * get_effective_quadrant_size(q.layer)); |