diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-15 19:06:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 19:06:25 +0100 |
commit | 0415a2d913fef3a0f352c8d62c6644fdfa6acb75 (patch) | |
tree | 0b386aaf2943aa7d01286fc27ef1c9b326f4be29 /modules | |
parent | 6ccc6b6e28a49a40d6e31e66fc1ef258141c3f1d (diff) | |
parent | 9bc62bf44934657f55c1b663eb72db6bcc9364e3 (diff) |
Merge pull request #44391 from madmiraal/fix-42285
Remove Generic6DOFJoint precision property
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 16 | ||||
-rw-r--r-- | modules/bullet/bullet_physics_server.h | 3 | ||||
-rw-r--r-- | modules/bullet/generic_6dof_joint_bullet.cpp | 8 | ||||
-rw-r--r-- | modules/bullet/generic_6dof_joint_bullet.h | 3 |
4 files changed, 0 insertions, 30 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 663ad6e3e1..3b548b7faa 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -1463,22 +1463,6 @@ bool BulletPhysicsServer3D::generic_6dof_joint_get_flag(RID p_joint, Vector3::Ax return generic_6dof_joint->get_flag(p_axis, p_flag); } -void BulletPhysicsServer3D::generic_6dof_joint_set_precision(RID p_joint, int p_precision) { - JointBullet *joint = joint_owner.getornull(p_joint); - ERR_FAIL_COND(!joint); - ERR_FAIL_COND(joint->get_type() != JOINT_6DOF); - Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint); - generic_6dof_joint->set_precision(p_precision); -} - -int BulletPhysicsServer3D::generic_6dof_joint_get_precision(RID p_joint) { - JointBullet *joint = joint_owner.getornull(p_joint); - ERR_FAIL_COND_V(!joint, 0); - ERR_FAIL_COND_V(joint->get_type() != JOINT_6DOF, 0); - Generic6DOFJointBullet *generic_6dof_joint = static_cast<Generic6DOFJointBullet *>(joint); - return generic_6dof_joint->get_precision(); -} - void BulletPhysicsServer3D::free(RID p_rid) { if (shape_owner.owns(p_rid)) { ShapeBullet *shape = shape_owner.getornull(p_rid); diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h index dca9339c44..07a32e510c 100644 --- a/modules/bullet/bullet_physics_server.h +++ b/modules/bullet/bullet_physics_server.h @@ -376,9 +376,6 @@ public: virtual void generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag, bool p_enable) override; virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_axis, G6DOFJointAxisFlag p_flag) override; - virtual void generic_6dof_joint_set_precision(RID p_joint, int precision) override; - virtual int generic_6dof_joint_get_precision(RID p_joint) override; - /* MISC */ virtual void free(RID p_rid) override; diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp index 56a66dba45..d75bf1fb98 100644 --- a/modules/bullet/generic_6dof_joint_bullet.cpp +++ b/modules/bullet/generic_6dof_joint_bullet.cpp @@ -273,11 +273,3 @@ bool Generic6DOFJointBullet::get_flag(Vector3::Axis p_axis, PhysicsServer3D::G6D ERR_FAIL_INDEX_V(p_axis, 3, false); return flags[p_axis][p_flag]; } - -void Generic6DOFJointBullet::set_precision(int p_precision) { - sixDOFConstraint->setOverrideNumSolverIterations(MAX(1, p_precision)); -} - -int Generic6DOFJointBullet::get_precision() const { - return sixDOFConstraint->getOverrideNumSolverIterations(); -} diff --git a/modules/bullet/generic_6dof_joint_bullet.h b/modules/bullet/generic_6dof_joint_bullet.h index 316708bb11..ed25337745 100644 --- a/modules/bullet/generic_6dof_joint_bullet.h +++ b/modules/bullet/generic_6dof_joint_bullet.h @@ -68,9 +68,6 @@ public: void set_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOFJointAxisFlag p_flag, bool p_value); bool get_flag(Vector3::Axis p_axis, PhysicsServer3D::G6DOFJointAxisFlag p_flag) const; - - void set_precision(int p_precision); - int get_precision() const; }; #endif |