Fix BlendSpace point insertion shift at a specific index

This commit is contained in:
Ryan
2026-04-28 16:21:59 -04:00
parent a8643700ce
commit 2470710a31
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ void AnimationNodeBlendSpace1D::add_blend_point(const Ref<AnimationRootNode> &p_
if (p_at_index == -1 || p_at_index == blend_points_used) {
p_at_index = blend_points_used;
} else {
for (int i = blend_points_used - 1; i > p_at_index; i--) {
for (int i = blend_points_used; i > p_at_index; i--) {
blend_points[i] = blend_points[i - 1];
}
}
+1 -1
View File
@@ -81,7 +81,7 @@ void AnimationNodeBlendSpace2D::add_blend_point(const Ref<AnimationRootNode> &p_
if (p_at_index == -1 || p_at_index == blend_points_used) {
p_at_index = blend_points_used;
} else {
for (int i = blend_points_used - 1; i > p_at_index; i--) {
for (int i = blend_points_used; i > p_at_index; i--) {
blend_points[i] = blend_points[i - 1];
}
for (int i = 0; i < triangles.size(); i++) {