summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-12-17 14:29:22 +0100
committerGitHub <noreply@github.com>2022-12-17 14:29:22 +0100
commitc023d41036f676572c43421670b2961991487884 (patch)
tree65c51a832f306064e6c41ab93c4a383dae2418d5
parentba32b716b312d6e974646e7704ddc7dd54e122e8 (diff)
parent7d6a25c91e6f4869a182a3f8fe387fadc0280314 (diff)
Merge pull request #70118 from clayjohn/tilemap-layers
Use large offset for tilemap layer level canvas items
-rw-r--r--scene/2d/tile_map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 842b614032..ad70559986 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1092,7 +1092,7 @@ void TileMap::_rendering_update_layer(int p_layer) {
/*Transform2D xform;
xform.set_origin(Vector2(0, p_layer));
rs->canvas_item_set_transform(ci, xform);*/
- rs->canvas_item_set_draw_index(ci, p_layer);
+ rs->canvas_item_set_draw_index(ci, p_layer - (int64_t)0x80000000);
layers[p_layer].canvas_item = ci;
}