diff options
author | kobewi <kobewi4e@gmail.com> | 2021-08-19 12:40:09 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-08-19 12:40:09 +0200 |
commit | a7ace9fec13a984ef50c861aaa890ad2f5c7d4b4 (patch) | |
tree | fa2a81221693c0f88ceceed4c86683b6da9c0cc3 | |
parent | 8b6c168b3ac14d9ac6350d03e7be4d196311e0fe (diff) |
Fix z_index applied twice for TileMap layers
-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)); |