diff options
author | kobewi <kobewi4e@gmail.com> | 2021-02-27 00:37:20 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-07-23 17:49:30 +0200 |
commit | 8793ec45647b57b5f5f772740c7aa8284e72ecb2 (patch) | |
tree | 9c9b2a2cefca8600d4d48c96fd088ad40f348704 /scene/main/scene_tree.cpp | |
parent | 8cddd3b2c04aceb040b8e862ec1bae904b6842e6 (diff) |
Show tooltips even when paused or time_scale is 0
Diffstat (limited to 'scene/main/scene_tree.cpp')
-rw-r--r-- | scene/main/scene_tree.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 2fe5d7aa78..644ce92018 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -82,6 +82,14 @@ bool SceneTreeTimer::is_process_always() { return process_always; } +void SceneTreeTimer::set_ignore_time_scale(bool p_ignore) { + ignore_time_scale = p_ignore; +} + +bool SceneTreeTimer::is_ignore_time_scale() { + return ignore_time_scale; +} + void SceneTreeTimer::release_connections() { List<Connection> connections; get_all_signal_connections(&connections); @@ -466,8 +474,13 @@ bool SceneTree::process(float p_time) { E = N; continue; } + float time_left = E->get()->get_time_left(); - time_left -= p_time; + if (E->get()->is_ignore_time_scale()) { + time_left -= Engine::get_singleton()->get_process_step(); + } else { + time_left -= p_time; + } E->get()->set_time_left(time_left); if (time_left < 0) { |