diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-07 14:27:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 14:27:29 +0200 |
commit | ca05613aed241898cd716c10529920b5f5ca0313 (patch) | |
tree | 86bce397ef1e1a56f089026321b2539fd5e94466 /scene/resources/tile_set.cpp | |
parent | ba541bceca806a53070a4fd54955ac4a63c1633a (diff) | |
parent | 625b87633efa2d67cfbc49f0060f27fedd2e0245 (diff) |
Merge pull request #31050 from sparkart/fix_tileset_shape_offset
Fix Wrong Shape Offsets in Tileset
Diffstat (limited to 'scene/resources/tile_set.cpp')
-rw-r--r-- | scene/resources/tile_set.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index bd5ce91e77..eed255fd6e 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -148,15 +148,20 @@ bool TileSet::_set(const StringName &p_name, const Variant &p_value) { } } } else if (what == "shape") - tile_set_shape(id, 0, p_value); + for (int i = 0; i < tile_get_shape_count(id); i++) + tile_set_shape(id, i, p_value); else if (what == "shape_offset") - tile_set_shape_offset(id, 0, p_value); + for (int i = 0; i < tile_get_shape_count(id); i++) + tile_set_shape_offset(id, i, p_value); else if (what == "shape_transform") - tile_set_shape_transform(id, 0, p_value); + for (int i = 0; i < tile_get_shape_count(id); i++) + tile_set_shape_transform(id, i, p_value); else if (what == "shape_one_way") - tile_set_shape_one_way(id, 0, p_value); + for (int i = 0; i < tile_get_shape_count(id); i++) + tile_set_shape_one_way(id, i, p_value); else if (what == "shape_one_way_margin") - tile_set_shape_one_way_margin(id, 0, p_value); + for (int i = 0; i < tile_get_shape_count(id); i++) + tile_set_shape_one_way_margin(id, i, p_value); else if (what == "shapes") _tile_set_shapes(id, p_value); else if (what == "occluder") |