From 82dac646598fb4799165952460cf8e4479f9fbef Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Sat, 29 Oct 2022 19:41:03 +0200 Subject: Change exclude property in `PhysicsRayQueryParameters3D` to TypedArray Change type of exclude property from `Vector` to `TypedArray` which is consistent with the 2D version. --- servers/physics_server_3d.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'servers/physics_server_3d.cpp') diff --git a/servers/physics_server_3d.cpp b/servers/physics_server_3d.cpp index db21e1db06..35833341f2 100644 --- a/servers/physics_server_3d.cpp +++ b/servers/physics_server_3d.cpp @@ -169,19 +169,19 @@ PhysicsDirectBodyState3D::PhysicsDirectBodyState3D() {} /////////////////////////////////////////////////////// -void PhysicsRayQueryParameters3D::set_exclude(const Vector &p_exclude) { +void PhysicsRayQueryParameters3D::set_exclude(const TypedArray &p_exclude) { parameters.exclude.clear(); for (int i = 0; i < p_exclude.size(); i++) { parameters.exclude.insert(p_exclude[i]); } } -Vector PhysicsRayQueryParameters3D::get_exclude() const { - Vector ret; +TypedArray PhysicsRayQueryParameters3D::get_exclude() const { + TypedArray ret; ret.resize(parameters.exclude.size()); int idx = 0; for (const RID &E : parameters.exclude) { - ret.write[idx++] = E; + ret[idx++] = E; } return ret; } @@ -225,7 +225,7 @@ void PhysicsRayQueryParameters3D::_bind_methods() { /////////////////////////////////////////////////////// -Ref PhysicsRayQueryParameters3D::create(Vector3 p_from, Vector3 p_to, uint32_t p_mask, const Vector &p_exclude) { +Ref PhysicsRayQueryParameters3D::create(Vector3 p_from, Vector3 p_to, uint32_t p_mask, const TypedArray &p_exclude) { Ref params; params.instantiate(); params->set_from(p_from); -- cgit v1.2.3