summaryrefslogtreecommitdiffstats
path: root/scene/animation/animation_player.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-10-20 23:08:02 +0200
committerGitHub <noreply@github.com>2017-10-20 23:08:02 +0200
commit08ebbc90a85ce15e1db2eab3ff3c25d7da1a4246 (patch)
treec523450e9abb785168e8e2d78832acabab32ffbd /scene/animation/animation_player.cpp
parentf2f75d1f117e52f3f4a033fdf967d35bb3dbaa42 (diff)
parentf4959ee32b2b40521cb622bfb211f1309c820b03 (diff)
downloadredot-engine-08ebbc90a85ce15e1db2eab3ff3c25d7da1a4246.tar.gz
Merge pull request #12107 from RandomShaper/fix-anim-before-first-key
Fix animation before first key
Diffstat (limited to 'scene/animation/animation_player.cpp')
-rw-r--r--scene/animation/animation_player.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index c4cfce5d72..2ecb184733 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -405,6 +405,10 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float
if (a->value_track_get_update_mode(i) == Animation::UPDATE_CONTINUOUS || (p_delta == 0 && a->value_track_get_update_mode(i) == Animation::UPDATE_DISCRETE)) { //delta == 0 means seek
Variant value = a->value_track_interpolate(i, p_time);
+
+ if (value == Variant())
+ continue;
+
//thanks to trigger mode, this should be solved now..
/*
if (p_delta==0 && value.get_type()==Variant::STRING)