From ee14b172011e7b7be1c3026c6dfbbf696fad9843 Mon Sep 17 00:00:00 2001 From: Chris Bradfield Date: Tue, 28 Nov 2017 22:06:49 -0800 Subject: [PATCH] Change RayCast2D 'Exclude Parent' to include Area2D --- scene/2d/ray_cast_2d.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 6ab20efdcc6..a8090230836 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -120,11 +120,11 @@ void RayCast2D::set_exclude_parent_body(bool p_exclude_parent_body) { if (!is_inside_tree()) return; - if (Object::cast_to(get_parent())) { + if (Object::cast_to(get_parent())) { if (exclude_parent_body) - exclude.insert(Object::cast_to(get_parent())->get_rid()); + exclude.insert(Object::cast_to(get_parent())->get_rid()); else - exclude.erase(Object::cast_to(get_parent())->get_rid()); + exclude.erase(Object::cast_to(get_parent())->get_rid()); } } @@ -144,11 +144,11 @@ void RayCast2D::_notification(int p_what) { else set_physics_process(false); - if (Object::cast_to(get_parent())) { + if (Object::cast_to(get_parent())) { if (exclude_parent_body) - exclude.insert(Object::cast_to(get_parent())->get_rid()); + exclude.insert(Object::cast_to(get_parent())->get_rid()); else - exclude.erase(Object::cast_to(get_parent())->get_rid()); + exclude.erase(Object::cast_to(get_parent())->get_rid()); } } break; case NOTIFICATION_EXIT_TREE: {