mirror of
https://github.com/mt-mods/led_marquee.git
synced 2024-11-30 19:13:47 +01:00
only reset the scroll index when starting the timer
(not when stopping it)
This commit is contained in:
parent
3df1e6454b
commit
3d5380ef25
4
init.lua
4
init.lua
@ -59,10 +59,10 @@ end
|
||||
|
||||
led_marquee.set_timer = function(pos, timeout)
|
||||
local timer = minetest.get_node_timer(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("index", 1)
|
||||
timer:stop()
|
||||
if timeout > 0 then
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("index", 1)
|
||||
timer:start(timeout)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user