mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Prevent being able to set bone's parent as itself
(cherry picked from commit d1bacb53fd)
This commit is contained in:
@@ -460,6 +460,7 @@ void Skeleton::set_bone_parent(int p_bone, int p_parent) {
|
||||
|
||||
ERR_FAIL_INDEX(p_bone, bones.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;
|
||||
|
||||
Reference in New Issue
Block a user