From cea5078ebe9b54ff3514fdae1cbeb1a17c808bae Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Fri, 8 Dec 2017 20:14:06 +0100 Subject: [PATCH] Fixes TileMap occluder offsets. This is NOT related to #14388! This fixes a graphical bug where the light occluders used by tilemaps weren't getting offset anymore, this they'd be positioned incorrectly. I tried on all 3 tilemap positioning modes and it seemed to work on every one. --- scene/2d/tile_map.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index c0d0a6e011b..609419cd440 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -513,16 +513,13 @@ void TileMap::_update_dirty_quadrants() { } Ref occluder; - Vector2 occluder_ofs; if (tile_set->tile_get_is_autotile(c.id)) { occluder = tile_set->autotile_get_light_occluder(c.id, Vector2(c.autotile_coord_x, c.autotile_coord_y)); - occluder_ofs = tile_set->tile_get_occluder_offset(c.id); } else { occluder = tile_set->tile_get_light_occluder(c.id); - occluder_ofs = Vector2(); } if (occluder.is_valid()) { - + Vector2 occluder_ofs = tile_set->tile_get_occluder_offset(c.id); Transform2D xform; xform.set_origin(offset.floor() + q.pos); _fix_cell_transform(xform, c, occluder_ofs + center_ofs, s);