diff options
Diffstat (limited to 'controller.lua')
-rw-r--r-- | controller.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/controller.lua b/controller.lua index 0a43eff..2921f81 100644 --- a/controller.lua +++ b/controller.lua @@ -645,7 +645,9 @@ end function celevator.controller.checkiqueue(dtime) for hash,iqueue in pairs(celevator.controller.iqueue) do local pos = minetest.get_position_from_hash(hash) + local noneleft = true for iid,time in pairs(iqueue) do + noneleft = false iqueue[iid] = time-dtime if iqueue[iid] < 0 then iqueue[iid] = nil @@ -655,6 +657,10 @@ function celevator.controller.checkiqueue(dtime) celevator.controller.run(pos,event) end end + if noneleft then + celevator.controller.iqueue[hash] = nil + celevator.storage:set_string("controller_iqueue",minetest.serialize(celevator.controller.iqueue)) + end end end |