summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2017-01-13 02:11:44 -0600
committercheapie <no-email-for-you@example.com>2017-01-13 02:11:44 -0600
commit18ba3c66592bcf13fee83c77ff6c2394ac98457a (patch)
treef309fddcb3bdd75ba5147cded1f205e1ed663f76
parent2dd4db0c890292a8304d37ac730a60033ded0f67 (diff)
downloadltc4000e-18ba3c66592bcf13fee83c77ff6c2394ac98457a.tar
ltc4000e-18ba3c66592bcf13fee83c77ff6c2394ac98457a.tar.gz
ltc4000e-18ba3c66592bcf13fee83c77ff6c2394ac98457a.tar.bz2
ltc4000e-18ba3c66592bcf13fee83c77ff6c2394ac98457a.tar.xz
ltc4000e-18ba3c66592bcf13fee83c77ff6c2394ac98457a.zip
Add lower bound on interrupt times
-rw-r--r--init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index d0b63cf..886e68d 100644
--- a/init.lua
+++ b/init.lua
@@ -279,6 +279,8 @@ local function run(pos,event)
end
function context.interrupt(time,iid)
+ --Enforce a minimum interrupt time of half a second
+ time = math.max(time,0.5)
if iid == "gapout" then
--This one can have the time changed on-the-fly, so it has to be done with node timers
local timer = minetest.get_node_timer(pos)