aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/tile_set_editor_plugin.cpp
diff options
context:
space:
mode:
authorSaracen2015-11-18 23:18:10 +0000
committerSaracen2015-11-18 23:18:10 +0000
commitdd00452997122029dd2f74a278574d781fd2bf5f (patch)
treee36f0c62cac499500724c2929100c042972d1a5c /tools/editor/plugins/tile_set_editor_plugin.cpp
parentc1d19ad258139c73e7aa81cf6e1fbd99e1bfe38b (diff)
parent94fdd01241749cb7a575ed5f9fa4c7bbb286901a (diff)
downloadgodot-dd00452997122029dd2f74a278574d781fd2bf5f.tar.gz
godot-dd00452997122029dd2f74a278574d781fd2bf5f.tar.zst
godot-dd00452997122029dd2f74a278574d781fd2bf5f.zip
Merge branch 'master' of https://github.com/okamstudio/godot into shadow_color
Conflicts: drivers/gles2/shader_compiler_gles2.cpp
Diffstat (limited to 'tools/editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 39b0ef3c7..09115472a 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -110,11 +110,15 @@ void TileSetEditor::_import_scene(Node *scene, Ref<TileSet> p_library, bool p_me
if (!child2->cast_to<StaticBody2D>())
continue;
StaticBody2D *sb = child2->cast_to<StaticBody2D>();
- if (sb->get_shape_count()==0)
+ int shape_count = sb->get_shape_count();
+ if (shape_count==0)
continue;
- Ref<Shape2D> collision=sb->get_shape(0);
- if (collision.is_valid()) {
- collisions.push_back(collision);
+ for (int shape_index=0; shape_index<shape_count; ++shape_index)
+ {
+ Ref<Shape2D> collision=sb->get_shape(shape_index);
+ if (collision.is_valid()) {
+ collisions.push_back(collision);
+ }
}
}