aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Shagrithaya2017-04-04 00:37:42 +0530
committerRémi Verschelde2017-04-05 08:23:34 +0200
commit323041a476a51cbea7afa0f47053097f7e3ab2b8 (patch)
treec5b3c130e5604547aad5ec0ccd6c5525b9b123a2
parenta67400aee701bd817727d3fa75566a49a04f8b1e (diff)
downloadgodot-323041a476a51cbea7afa0f47053097f7e3ab2b8.tar.gz
godot-323041a476a51cbea7afa0f47053097f7e3ab2b8.tar.zst
godot-323041a476a51cbea7afa0f47053097f7e3ab2b8.zip
previous value of time_left is added to wait_time before assigning to time_left
(cherry picked from commit ea4fbee8f2778bc864cb930c69016cb175812da7)
-rw-r--r--scene/main/timer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 1010e76ba..f8d748c29 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -66,8 +66,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 + time_left;
else
stop();
emit_signal("timeout");