From 8577aa5b3b62d63a33da00085acb3d251334ba95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 9 May 2014 16:54:00 +0200 Subject: [PATCH] fixed timer listening --- application/core/Callbacks/TimerListening.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/core/Callbacks/TimerListening.php b/application/core/Callbacks/TimerListening.php index 1992510f..424d70ae 100644 --- a/application/core/Callbacks/TimerListening.php +++ b/application/core/Callbacks/TimerListening.php @@ -44,7 +44,11 @@ class TimerListening { * Increase last Trigger Time */ public function tick() { - $this->lastTrigger += $this->deltaTime; + if ($this->lastTrigger === null) { + $this->lastTrigger = microtime(true); + } else { + $this->lastTrigger += $this->deltaTime; + } } /**