Godot Engine – Multi-platform 2D and 3D game engine
Fix incorrect joint type check in slider_joint_get_param
Rizo Hashimi413944b5378a
diff --git a/modules/godot_physics_3d/godot_physics_server_3d.cpp b/modules/godot_physics_3d/godot_physics_server_3d.cppindex a7e1d03f14b..a8d925f744e 100644--- a/modules/godot_physics_3d/godot_physics_server_3d.cpp+++ b/modules/godot_physics_3d/godot_physics_server_3d.cpp@@ -1495,7 +1495,7 @@ void GodotPhysicsServer3D::slider_joint_set_param(RID p_joint, PS3DE::SliderJoinreal_t GodotPhysicsServer3D::slider_joint_get_param(RID p_joint, PS3DE::SliderJointParam p_param) const {GodotJoint3D *joint = joint_owner.get_or_null(p_joint);ERR_FAIL_NULL_V(joint, 0);- ERR_FAIL_COND_V(joint->get_type() != PS3DE::JOINT_TYPE_CONE_TWIST, 0);+ ERR_FAIL_COND_V(joint->get_type() != PS3DE::JOINT_TYPE_SLIDER, 0);GodotSliderJoint3D *slider_joint = static_cast<GodotSliderJoint3D *>(joint);return slider_joint->get_param(p_param);}