Prevent being able to set bone's parent as itself
This commit is contained in:
parent
bfcc29635f
commit
59ff3fda7f
1 changed files with 1 additions and 0 deletions
|
@ -520,6 +520,7 @@ void Skeleton3D::set_bone_parent(int p_bone, int p_parent) {
|
|||
const int bone_size = bones.size();
|
||||
ERR_FAIL_INDEX(p_bone, bone_size);
|
||||
ERR_FAIL_COND(p_parent != -1 && (p_parent < 0));
|
||||
ERR_FAIL_COND(p_bone == p_parent);
|
||||
|
||||
bones.write[p_bone].parent = p_parent;
|
||||
process_order_dirty = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue