Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix joint RID not being passed to _set in PhysicalBone #44535

Merged
merged 1 commit into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scene/3d/physics_body_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ bool PhysicalBone3D::_set(const StringName &p_name, const Variant &p_value) {
}

if (joint_data) {
if (joint_data->_set(p_name, p_value)) {
if (joint_data->_set(p_name, p_value, joint)) {
#ifdef TOOLS_ENABLED
if (get_gizmo().is_valid()) {
get_gizmo()->redraw();
Expand Down
12 changes: 6 additions & 6 deletions scene/3d/physics_body_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class PhysicalBone3D : public PhysicsBody3D {
virtual JointType get_joint_type() { return JOINT_TYPE_NONE; }

/// "j" is used to set the parameter inside the PhysicsServer3D
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand All @@ -380,7 +380,7 @@ class PhysicalBone3D : public PhysicsBody3D {
struct PinJointData : public JointData {
virtual JointType get_joint_type() { return JOINT_TYPE_PIN; }

virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand All @@ -394,7 +394,7 @@ class PhysicalBone3D : public PhysicsBody3D {
struct ConeJointData : public JointData {
virtual JointType get_joint_type() { return JOINT_TYPE_CONE; }

virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand All @@ -411,7 +411,7 @@ class PhysicalBone3D : public PhysicsBody3D {
struct HingeJointData : public JointData {
virtual JointType get_joint_type() { return JOINT_TYPE_HINGE; }

virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand All @@ -431,7 +431,7 @@ class PhysicalBone3D : public PhysicsBody3D {
struct SliderJointData : public JointData {
virtual JointType get_joint_type() { return JOINT_TYPE_SLIDER; }

virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand Down Expand Up @@ -478,7 +478,7 @@ class PhysicalBone3D : public PhysicsBody3D {

virtual JointType get_joint_type() { return JOINT_TYPE_6DOF; }

virtual bool _set(const StringName &p_name, const Variant &p_value, RID j = RID());
virtual bool _set(const StringName &p_name, const Variant &p_value, RID j);
virtual bool _get(const StringName &p_name, Variant &r_ret) const;
virtual void _get_property_list(List<PropertyInfo> *p_list) const;

Expand Down