diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-07-24 00:03:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 00:03:43 +0200 |
commit | b642e430ceb18d12bd05d6c05e0885488a1f73ca (patch) | |
tree | b94a2b48c00efa8eb6f298328bc4fbe111792134 /scene/resources/animation.cpp | |
parent | c853dd5ddba79620177614f273ce4d08664a3bf4 (diff) | |
parent | e1a1bb0a6ef14a809395a239f661db20b52a9f0e (diff) |
Merge pull request #40643 from KoBeWi/key_keeper
Keep transition value when replacing key
Diffstat (limited to 'scene/resources/animation.cpp')
-rw-r--r-- | scene/resources/animation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 479d97aadc..b8edd70712 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -752,7 +752,9 @@ int Animation::_insert(float p_time, T &p_keys, const V &p_value) { while (true) { // Condition for replacement. if (idx > 0 && Math::is_equal_approx(p_keys[idx - 1].time, p_time)) { + float transition = p_keys[idx - 1].transition; p_keys.write[idx - 1] = p_value; + p_keys.write[idx - 1].transition = transition; return idx - 1; // Condition for insert. |