diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-04-05 08:22:41 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-04-05 08:22:41 +0200 |
commit | 5b5a825c7fdb3a1f158a377e5febef7ab7b77903 (patch) | |
tree | 14b3458cd9639be2ffdef01b0e34fcf050829f9f /scene | |
parent | 4989cc36171a429830a80a072c3a9df26bb146fc (diff) |
Fixer looping timer accumulation in _process
Follow-up to #8251.
Diffstat (limited to 'scene')
-rwxr-xr-x | scene/main/timer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp index 7e3c5db5bc..aeb72a6d1e 100755 --- a/scene/main/timer.cpp +++ b/scene/main/timer.cpp @@ -50,8 +50,7 @@ void Timer::_notification(int p_what) { if (time_left < 0) { if (!one_shot) - //time_left=wait_time+time_left; - time_left = wait_time; + time_left += wait_time; else stop(); @@ -66,7 +65,7 @@ void Timer::_notification(int p_what) { if (time_left < 0) { if (!one_shot) - time_left = wait_time + time_left; + time_left += wait_time; else stop(); emit_signal("timeout"); |