diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_server_2d.cpp | 6 | ||||
-rw-r--r-- | servers/physics_server_2d.h | 14 | ||||
-rw-r--r-- | servers/physics_server_3d.h | 9 |
3 files changed, 4 insertions, 25 deletions
diff --git a/servers/physics_server_2d.cpp b/servers/physics_server_2d.cpp index 7c5761cc61..0028ee0d1f 100644 --- a/servers/physics_server_2d.cpp +++ b/servers/physics_server_2d.cpp @@ -509,12 +509,6 @@ void PhysicsTestMotionResult2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape"), "", "get_collider_shape"); } -PhysicsTestMotionResult2D::PhysicsTestMotionResult2D() { - colliding = false; - - result.collider_shape = 0; -} - /////////////////////////////////////// bool PhysicsServer2D::_body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin, const Ref<PhysicsTestMotionResult2D> &p_result) { diff --git a/servers/physics_server_2d.h b/servers/physics_server_2d.h index f2836961f2..4d971861eb 100644 --- a/servers/physics_server_2d.h +++ b/servers/physics_server_2d.h @@ -493,17 +493,11 @@ public: Vector2 collision_point; Vector2 collision_normal; Vector2 collider_velocity; - int collision_local_shape; + int collision_local_shape = 0; ObjectID collider_id; RID collider; - int collider_shape; + int collider_shape = 0; Variant collider_metadata; - - MotionResult() { - collision_local_shape = 0; - collider_shape = 0; - collider_id = ObjectID(); - } }; virtual bool body_test_motion(RID p_body, const Transform2D &p_from, const Vector2 &p_motion, bool p_infinite_inertia, real_t p_margin = 0.001, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) = 0; @@ -607,7 +601,6 @@ class PhysicsTestMotionResult2D : public Reference { GDCLASS(PhysicsTestMotionResult2D, Reference); PhysicsServer2D::MotionResult result; - bool colliding; friend class PhysicsServer2D; protected: @@ -616,7 +609,6 @@ protected: public: PhysicsServer2D::MotionResult *get_result_ptr() const { return const_cast<PhysicsServer2D::MotionResult *>(&result); } - //bool is_colliding() const; Vector2 get_motion() const; Vector2 get_motion_remainder() const; @@ -627,8 +619,6 @@ public: RID get_collider_rid() const; Object *get_collider() const; int get_collider_shape() const; - - PhysicsTestMotionResult2D(); }; typedef PhysicsServer2D *(*CreatePhysicsServer2DCallback)(); diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index 6bfdc5f578..19488a5ad3 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -500,16 +500,11 @@ public: Vector3 collision_point; Vector3 collision_normal; Vector3 collider_velocity; - int collision_local_shape; + int collision_local_shape = 0; ObjectID collider_id; RID collider; - int collider_shape; + int collider_shape = 0; Variant collider_metadata; - MotionResult() { - collision_local_shape = 0; - collider_id = ObjectID(); - collider_shape = 0; - } }; virtual bool body_test_motion(RID p_body, const Transform3D &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = nullptr, bool p_exclude_raycast_shapes = true) = 0; |