aboutsummaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/animation/animation_blend_space_1d.cpp (renamed from scene/animation/animation_blend_space1d.cpp)6
-rw-r--r--scene/animation/animation_blend_space_1d.h (renamed from scene/animation/animation_blend_space1d.h)6
-rw-r--r--scene/animation/animation_blend_space_2d.cpp (renamed from scene/animation/animation_blend_space2d.cpp)4
-rw-r--r--scene/animation/animation_blend_space_2d.h (renamed from scene/animation/animation_blend_space2d.h)6
-rw-r--r--scene/register_scene_types.cpp4
5 files changed, 13 insertions, 13 deletions
diff --git a/scene/animation/animation_blend_space1d.cpp b/scene/animation/animation_blend_space_1d.cpp
index 28555e41b..6f659cc2b 100644
--- a/scene/animation/animation_blend_space1d.cpp
+++ b/scene/animation/animation_blend_space_1d.cpp
@@ -1,9 +1,9 @@
-#include "animation_blend_space1d.h"
+#include "animation_blend_space_1d.h"
void AnimationNodeBlendSpace1D::_validate_property(PropertyInfo &property) const {
if (property.name.begins_with("blend_point_")) {
String left = property.name.get_slicec('/', 0);
- int idx = left.get_slicec('_', 1).to_int();
+ int idx = left.get_slicec('_', 2).to_int();
if (idx >= blend_points_used) {
property.usage = 0;
}
@@ -58,7 +58,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; i > p_at_index; i++) {
+ for (int i = blend_points_used - 1; i > p_at_index; i++) {
blend_points[i] = blend_points[i - 1];
}
}
diff --git a/scene/animation/animation_blend_space1d.h b/scene/animation/animation_blend_space_1d.h
index 9db8f5359..447c948e9 100644
--- a/scene/animation/animation_blend_space1d.h
+++ b/scene/animation/animation_blend_space_1d.h
@@ -1,5 +1,5 @@
-#ifndef ANIMATION_BLEND_SPACE1D_H
-#define ANIMATION_BLEND_SPACE1D_H
+#ifndef ANIMATION_BLEND_SPACE_1D_H
+#define ANIMATION_BLEND_SPACE_1D_H
#include "scene/animation/animation_graph_player.h"
@@ -65,4 +65,4 @@ public:
~AnimationNodeBlendSpace1D();
};
-#endif // ANIMATION_BLEND_SPACE1D_H
+#endif // ANIMATION_BLEND_SPACE_1D_H
diff --git a/scene/animation/animation_blend_space2d.cpp b/scene/animation/animation_blend_space_2d.cpp
index 6db4a6976..675285b07 100644
--- a/scene/animation/animation_blend_space2d.cpp
+++ b/scene/animation/animation_blend_space_2d.cpp
@@ -1,4 +1,4 @@
-#include "animation_blend_space2d.h"
+#include "animation_blend_space_2d.h"
#include "math/delaunay.h"
void AnimationNodeBlendSpace2D::add_blend_point(const Ref<AnimationRootNode> &p_node, const Vector2 &p_position, int p_at_index) {
@@ -10,7 +10,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; i > p_at_index; i--) {
+ for (int i = blend_points_used - 1; i > p_at_index; i--) {
blend_points[i] = blend_points[i - 1];
}
for (int i = 0; i < triangles.size(); i++) {
diff --git a/scene/animation/animation_blend_space2d.h b/scene/animation/animation_blend_space_2d.h
index 9c992578d..f8f244008 100644
--- a/scene/animation/animation_blend_space2d.h
+++ b/scene/animation/animation_blend_space_2d.h
@@ -1,5 +1,5 @@
-#ifndef ANIMATION_BLEND_SPACE2D_H
-#define ANIMATION_BLEND_SPACE2D_H
+#ifndef ANIMATION_BLEND_SPACE_2D_H
+#define ANIMATION_BLEND_SPACE_2D_H
#include "scene/animation/animation_graph_player.h"
@@ -91,4 +91,4 @@ public:
~AnimationNodeBlendSpace2D();
};
-#endif // ANIMATION_BLEND_SPACE_H
+#endif // ANIMATION_BLEND_SPACE_2D_H
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 9fbdf675e..e7cde8ddb 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -63,8 +63,8 @@
#include "scene/2d/tile_map.h"
#include "scene/2d/visibility_notifier_2d.h"
#include "scene/2d/y_sort.h"
-#include "scene/animation/animation_blend_space1d.h"
-#include "scene/animation/animation_blend_space2d.h"
+#include "scene/animation/animation_blend_space_1d.h"
+#include "scene/animation/animation_blend_space_2d.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_graph_player.h"
#include "scene/animation/animation_node_state_machine.h"