Browse Source

Fixer looping timer accumulation in _process

Follow-up to #8251.

(cherry picked from commit 5b5a825c7fdb3a1f158a377e5febef7ab7b77903)
Rémi Verschelde 8 years ago
parent
commit
9a9bd12913
1 changed files with 2 additions and 3 deletions
  1. 2 3
      scene/main/timer.cpp

+ 2 - 3
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");