summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trafficlight/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/trafficlight/init.lua b/trafficlight/init.lua
index 2b2038b..4a1e24d 100644
--- a/trafficlight/init.lua
+++ b/trafficlight/init.lua
@@ -104,11 +104,11 @@ local function ped_on_flash_end(pos,record)
obj:remove()
end
end
+ local timer = minetest.get_node_timer(pos)
if not record then
timer:stop()
return
end
- local timer = minetest.get_node_timer(pos)
local meta = minetest.get_meta(pos)
local lastflashtime = meta:get_int("lastflashtime")
local twoflashesago = meta:get_int("twoflashesago")