From 4ecb6fba8002533f266d03e13ccba7cee4216421 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 21 May 2021 01:23:35 -0400 Subject: [PATCH] Use doubles for time everywhere in Timer/SceneTree --- core/os/main_loop.cpp | 4 ++-- core/os/main_loop.h | 4 ++-- main/main_timer_sync.cpp | 26 +++++++++++++------------- main/main_timer_sync.h | 22 +++++++++++----------- main/performance.cpp | 8 ++++---- main/performance.h | 12 ++++++------ scene/main/scene_tree.cpp | 12 ++++++------ scene/main/scene_tree.h | 20 ++++++++++---------- scene/main/timer.cpp | 8 ++++---- scene/main/timer.h | 10 +++++----- tests/test_physics_2d.cpp | 2 +- tests/test_physics_3d.cpp | 4 ++-- tests/test_render.cpp | 4 ++-- 13 files changed, 68 insertions(+), 68 deletions(-) diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index 016d9d0a09..3c0e56f5a8 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -66,7 +66,7 @@ void MainLoop::initialize() { } } -bool MainLoop::physics_process(float p_time) { +bool MainLoop::physics_process(double p_time) { if (get_script_instance()) { return get_script_instance()->call("_physics_process", p_time); } @@ -74,7 +74,7 @@ bool MainLoop::physics_process(float p_time) { return false; } -bool MainLoop::process(float p_time) { +bool MainLoop::process(double p_time) { if (get_script_instance()) { return get_script_instance()->call("_process", p_time); } diff --git a/core/os/main_loop.h b/core/os/main_loop.h index 34e944709b..b42e9b18ff 100644 --- a/core/os/main_loop.h +++ b/core/os/main_loop.h @@ -60,8 +60,8 @@ public: }; virtual void initialize(); - virtual bool physics_process(float p_time); - virtual bool process(float p_time); + virtual bool physics_process(double p_time); + virtual bool process(double p_time); virtual void finalize(); void set_initialize_script(const Ref