summaryrefslogtreecommitdiff
path: root/servers/physics_server_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_server_2d.cpp')
-rw-r--r--servers/physics_server_2d.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp
index d6d23f8310..3259bd6ef9 100644
--- a/servers/physics_server_2d.cpp
+++ b/servers/physics_server_2d.cpp
@@ -158,7 +158,7 @@ Vector<RID> PhysicsRayQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
+ for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
ret.write[idx++] = E->get();
}
return ret;
@@ -208,7 +208,7 @@ Vector<RID> PhysicsPointQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
+ for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
ret.write[idx++] = E->get();
}
return ret;
@@ -267,7 +267,7 @@ Vector<RID> PhysicsShapeQueryParameters2D::get_exclude() const {
Vector<RID> ret;
ret.resize(parameters.exclude.size());
int idx = 0;
- for (Set<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
+ for (RBSet<RID>::Element *E = parameters.exclude.front(); E; E = E->next()) {
ret.write[idx++] = E->get();
}
return ret;
@@ -505,12 +505,16 @@ void PhysicsTestMotionParameters2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_exclude_objects"), &PhysicsTestMotionParameters2D::get_exclude_objects);
ClassDB::bind_method(D_METHOD("set_exclude_objects", "exclude_list"), &PhysicsTestMotionParameters2D::set_exclude_objects);
+ ClassDB::bind_method(D_METHOD("is_recovery_as_collision_enabled"), &PhysicsTestMotionParameters2D::is_recovery_as_collision_enabled);
+ ClassDB::bind_method(D_METHOD("set_recovery_as_collision_enabled", "enabled"), &PhysicsTestMotionParameters2D::set_recovery_as_collision_enabled);
+
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "from"), "set_from", "get_from");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "motion"), "set_motion", "get_motion");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin"), "set_margin", "get_margin");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_separation_ray"), "set_collide_separation_ray_enabled", "is_collide_separation_ray_enabled");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_bodies", PROPERTY_HINT_ARRAY_TYPE, "RID"), "set_exclude_bodies", "get_exclude_bodies");
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "exclude_objects"), "set_exclude_objects", "get_exclude_objects");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recovery_as_collision"), "set_recovery_as_collision_enabled", "is_recovery_as_collision_enabled");
}
///////////////////////////////