Fix joint RID not being passed to _set in PhysicalBone

Also remove default RID() argument from JointData._set()

(cherry picked from commit 41e00b6787)
This commit is contained in:
David Hoppenbrouwers 2020-12-20 18:39:18 +01:00 committed by Rémi Verschelde
parent 43d3eca5e9
commit 224fce946b
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 7 additions and 7 deletions

View file

@ -2127,7 +2127,7 @@ bool PhysicalBone::_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();

View file

@ -394,7 +394,7 @@ public:
virtual JointType get_joint_type() { return JOINT_TYPE_NONE; }
/// "j" is used to set the parameter inside the PhysicsServer
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;
@ -404,7 +404,7 @@ public:
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;
@ -421,7 +421,7 @@ public:
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;
@ -442,7 +442,7 @@ public:
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;
@ -465,7 +465,7 @@ public:
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;
@ -543,7 +543,7 @@ public:
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;