summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2015-02-17 20:02:24 +0100
committerJeija <norrepli@gmail.com>2015-02-17 20:02:24 +0100
commit1ee3b2107db8dd5e36b773d446eece882ad27e2a (patch)
tree404b6df7823c9f1148e3b594c4d085fab8abf590
parent1df6e5a03bbc4057571a882017009f5e6c54907b (diff)
downloadmesecons-1ee3b2107db8dd5e36b773d446eece882ad27e2a.tar
mesecons-1ee3b2107db8dd5e36b773d446eece882ad27e2a.tar.gz
mesecons-1ee3b2107db8dd5e36b773d446eece882ad27e2a.tar.bz2
mesecons-1ee3b2107db8dd5e36b773d446eece882ad27e2a.tar.xz
mesecons-1ee3b2107db8dd5e36b773d446eece882ad27e2a.zip
Fix movestones sometimes not starting to move again when they are at the
end of the wire
-rw-r--r--mesecons_movestones/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesecons_movestones/init.lua b/mesecons_movestones/init.lua
index 2a0b04f..69b8c5d 100644
--- a/mesecons_movestones/init.lua
+++ b/mesecons_movestones/init.lua
@@ -63,7 +63,10 @@ function mesecon.register_movestone(name, def, is_sticky)
end
local direction = mesecon.get_movestone_direction(pos)
- if not direction then return end
+ if not direction then
+ minetest.set_node(pos, {name = name})
+ return
+ end
local frontpos = vector.add(pos, direction)
local backpos = vector.subtract(pos, direction)