diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-28 23:16:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 23:16:29 +0100 |
commit | 2279edeaf02d44612d09d332bd1dbaf7924ec7c1 (patch) | |
tree | f2cb8cc4e3e5e3509df23f0be8e68127e815a5d5 /editor/plugins | |
parent | 27e4c84edd250857db4770bb732e8b12d72e1f52 (diff) | |
parent | 065084624848999e7559be065e5d8233d028ee3c (diff) |
Merge pull request #57368 from TokageItLab/fix-delta-for-animation-tree
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 26ce6de0df..94990636da 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -854,10 +854,10 @@ void AnimationNodeStateMachineEditor::_state_machine_pos_draw() { } to.y = from.y; - double len = MAX(0.0001, current_length); + float len = MAX(0.0001, current_length); - double pos = CLAMP(play_pos, 0, len); - double c = pos / len; + float pos = CLAMP(play_pos, 0, len); + float c = pos / len; Color fg = get_theme_color(SNAME("font_color"), SNAME("Label")); Color bg = fg; bg.a *= 0.3; diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index d948e05472..8970e3e062 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -159,11 +159,11 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin { StringName last_blend_from_node; StringName last_current_node; Vector<StringName> last_travel_path; - double last_play_pos; - double play_pos; - double current_length; + float last_play_pos; + float play_pos; + float current_length; - double error_time; + float error_time; String error_text; EditorFileDialog *open_file; |