aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rudin <thomas@rudin.io>2019-10-09 21:57:28 +0200
committerThomas Rudin <thomas@rudin.io>2019-10-09 21:57:28 +0200
commit3839b34a256701b54c9cb9f5a1091e4a257815da (patch)
tree57734ecfa3e677b55ae463e5a1e5ae078991f926
parent3582abf84cf9dd3a1e4a227cb48db2e6bdbb811c (diff)
downloadmesecons_debug-3839b34a256701b54c9cb9f5a1091e4a257815da.tar.gz
mesecons_debug-3839b34a256701b54c9cb9f5a1091e4a257815da.zip
flush before re-init
Diffstat (limited to '')
-rw-r--r--overrides.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/overrides.lua b/overrides.lua
index 3af4d22..61fc2aa 100644
--- a/overrides.lua
+++ b/overrides.lua
@@ -57,6 +57,7 @@ minetest.register_globalstep(function(dtime)
if reenable_seconds < 1 then
-- re-enable again
enabled = true
+ mesecon.queue.actions = {}
end
end
@@ -75,6 +76,8 @@ minetest.register_chatcommand("mesecons_enable", {
description = "enables the mesecons globlastep",
privs = {mesecons_debug=true},
func = function()
+ -- flush actions, while we are on it
+ mesecon.queue.actions = {}
enabled = true
return true, "mesecons enabled"
end
@@ -85,8 +88,6 @@ minetest.register_chatcommand("mesecons_disable", {
privs = {mesecons_debug=true},
func = function()
enabled = false
- -- flush actions, while we are on it
- mesecon.queue.actions = {}
return true, "mesecons disabled"
end
})