From 065084624848999e7559be065e5d8233d028ee3c Mon Sep 17 00:00:00 2001 From: Silc 'Tokage' Renew Date: Sat, 29 Jan 2022 05:07:30 +0900 Subject: Make AnimationTree delta argument force double in core --- editor/plugins/animation_state_machine_editor.cpp | 6 +++--- editor/plugins/animation_state_machine_editor.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'editor/plugins') 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 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; -- cgit v1.2.3