summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/animation_player.cpp10
-rw-r--r--scene/animation/animation_player.h1
-rw-r--r--scene/animation/animation_tree.cpp2
-rw-r--r--scene/animation/tween.h1
4 files changed, 5 insertions, 9 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 30757d2d80..e9e17148d6 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -30,8 +30,8 @@
#include "animation_player.h"
-#include "core/engine.h"
-#include "core/message_queue.h"
+#include "core/config/engine.h"
+#include "core/object/message_queue.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
@@ -762,12 +762,10 @@ void AnimationPlayer::_animation_process_data(PlaybackData &cd, float p_delta, f
next_pos = len;
}
- // fix delta
- delta = next_pos - cd.pos;
+ bool backwards = signbit(delta); // Negative zero means playing backwards too
+ delta = next_pos - cd.pos; // Fix delta (after determination of backwards because negative zero is lost here)
if (&cd == &playback.current) {
- bool backwards = delta < 0;
-
if (!backwards && cd.pos <= len && next_pos == len /*&& playback.blend.empty()*/) {
//playback finished
end_reached = true;
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index e1b9dffb1f..dbce5643c7 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -72,7 +72,6 @@ public:
private:
enum {
-
NODE_CACHE_UPDATE_MAX = 1024,
BLEND_FROM_MAX = 3
};
diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp
index bb5d536600..2ef3ba87b2 100644
--- a/scene/animation/animation_tree.cpp
+++ b/scene/animation/animation_tree.cpp
@@ -31,7 +31,7 @@
#include "animation_tree.h"
#include "animation_blend_tree.h"
-#include "core/engine.h"
+#include "core/config/engine.h"
#include "scene/scene_string_names.h"
#include "servers/audio/audio_stream.h"
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 668870c526..822fcf0b6f 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -69,7 +69,6 @@ public:
private:
enum InterpolateType {
-
INTER_PROPERTY,
INTER_METHOD,
FOLLOW_PROPERTY,