Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from evrimoztamur/patch-1
Browse files Browse the repository at this point in the history
Recover lost time for timers on repeat
  • Loading branch information
a327ex committed Feb 26, 2018
2 parents 07cb0af + 2f37a6d commit d31b963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Timer.lua
Expand Up @@ -46,7 +46,7 @@ function Timer:update(dt)
elseif timer.type == 'every' then
if timer.time >= timer.delay then
timer.action()
timer.time = 0
timer.time = timer.time - timer.delay
timer.delay = self:__getResolvedDelay(timer.any_delay)
if timer.count > 0 then
timer.counter = timer.counter + 1
Expand Down

0 comments on commit d31b963

Please sign in to comment.