summaryrefslogtreecommitdiff
path: root/modules/bullet/hinge_joint_bullet.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-27 07:46:40 +0200
committerGitHub <noreply@github.com>2018-08-27 07:46:40 +0200
commit98cc2ce1dd62947e240f61d61b995328b73fca6a (patch)
tree49a8aa1bdeac869ea8f0aa5f60266d5cd4644e39 /modules/bullet/hinge_joint_bullet.cpp
parentdb55d8a4b6ad6c14f2131e02b50689eb8380276f (diff)
parent76d02b13a18d477dcf21aa3a0e5664fc0e609ba3 (diff)
Merge pull request #21433 from AndreaCatania/megafix
Multiple fixes on Physics things
Diffstat (limited to 'modules/bullet/hinge_joint_bullet.cpp')
-rw-r--r--modules/bullet/hinge_joint_bullet.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/bullet/hinge_joint_bullet.cpp b/modules/bullet/hinge_joint_bullet.cpp
index 07fde6efb9..bfdc5aafc1 100644
--- a/modules/bullet/hinge_joint_bullet.cpp
+++ b/modules/bullet/hinge_joint_bullet.cpp
@@ -95,11 +95,6 @@ real_t HingeJointBullet::get_hinge_angle() {
void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t p_value) {
switch (p_param) {
- case PhysicsServer::HINGE_JOINT_BIAS:
- if (0 < p_value) {
- WARN_PRINTS("HingeJoint doesn't support bias in the Bullet backend, so it's always 0.");
- }
- break;
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
hingeConstraint->setLimit(hingeConstraint->getLowerLimit(), p_value, hingeConstraint->getLimitSoftness(), hingeConstraint->getLimitBiasFactor(), hingeConstraint->getLimitRelaxationFactor());
break;
@@ -121,8 +116,11 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
hingeConstraint->setMaxMotorImpulse(p_value);
break;
+#ifndef DISABLE_DEPRECATED
default:
- WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param) + ", value: " + itos(p_value));
+ ERR_EXPLAIN("This parameter " + itos(p_param) + " is deprecated");
+ WARN_DEPRECATED
+#endif // DISABLE_DEPRECATED
}
}
@@ -145,9 +143,12 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const
return hingeConstraint->getMotorTargetVelocity();
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
return hingeConstraint->getMaxMotorImpulse();
+#ifndef DISABLE_DEPRECATED
default:
- WARN_PRINTS("HingeJoint doesn't support this parameter in the Bullet backend: " + itos(p_param));
+ ERR_EXPLAIN("This parameter " + itos(p_param) + " is deprecated");
+ WARN_DEPRECATED;
return 0;
+#endif // DISABLE_DEPRECATED
}
}