mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Prevent being able to set bone's parent as itself
This commit is contained in:
parent
bfcc29635f
commit
59ff3fda7f
@ -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…
Reference in New Issue
Block a user