diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/canvas_item.cpp | 2 | ||||
-rw-r--r-- | scene/2d/collision_shape_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/sample_player_2d.cpp | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 49229ba500..357aaa225b 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -265,7 +265,7 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) { CanvasItem *c=get_child(i)->cast_to<CanvasItem>(); - if (c && c->hidden!=p_visible) //should the toplevels stop propagation? i think so but.. + if (c && !c->hidden) //should the toplevels stop propagation? i think so but.. c->_propagate_visibility_changed(p_visible); } diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index cd89e914fb..85751fc735 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -113,6 +113,10 @@ void CollisionShape2D::_notification(int p_what) { break; } + if (!shape.is_valid()) { + break; + } + rect=Rect2(); diff --git a/scene/2d/sample_player_2d.cpp b/scene/2d/sample_player_2d.cpp index bb37475944..ec17ffc55e 100644 --- a/scene/2d/sample_player_2d.cpp +++ b/scene/2d/sample_player_2d.cpp @@ -214,7 +214,7 @@ void SamplePlayer2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_sample_library","library:SampleLibrary"),&SamplePlayer2D::set_sample_library); ObjectTypeDB::bind_method(_MD("get_sample_library:SampleLibrary"),&SamplePlayer2D::get_sample_library); - ObjectTypeDB::bind_method(_MD("set_polyphony","voices"),&SamplePlayer2D::set_polyphony); + ObjectTypeDB::bind_method(_MD("set_polyphony","max_voices"),&SamplePlayer2D::set_polyphony); ObjectTypeDB::bind_method(_MD("get_polyphony"),&SamplePlayer2D::get_polyphony); ObjectTypeDB::bind_method(_MD("play","sample","voice"),&SamplePlayer2D::play,DEFVAL(NEXT_VOICE)); |