diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-20 09:44:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 09:44:30 +0100 |
commit | 68ddab547b6c67d6102297d83ef71487050e85e0 (patch) | |
tree | 9c99a0796afadec29949a7b5a42fced9cf9a0799 /scene | |
parent | 6a683f80169850d1138c38f7182bdcadf4dafd10 (diff) | |
parent | afcb6f38db9c313328130b6632073cda7f3b98e0 (diff) |
Merge pull request #43703 from Xrayez/premature-timer
Do not start `Timer` upon manual switching of internal process
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/timer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index c9fce2f6c2..1c6037d26e 100644 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -46,7 +46,7 @@ void Timer::_notification(int p_what) { } } break; case NOTIFICATION_INTERNAL_PROCESS: { - if (timer_process_mode == TIMER_PROCESS_PHYSICS || !is_processing_internal()) { + if (!processing || timer_process_mode == TIMER_PROCESS_PHYSICS || !is_processing_internal()) { return; } time_left -= get_process_delta_time(); @@ -63,7 +63,7 @@ void Timer::_notification(int p_what) { } break; case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { - if (timer_process_mode == TIMER_PROCESS_IDLE || !is_physics_processing_internal()) { + if (!processing || timer_process_mode == TIMER_PROCESS_IDLE || !is_physics_processing_internal()) { return; } time_left -= get_physics_process_delta_time(); |