summaryrefslogtreecommitdiff
path: root/util_execute_cycle.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util_execute_cycle.lua')
-rw-r--r--util_execute_cycle.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/util_execute_cycle.lua b/util_execute_cycle.lua
index e5ba7d2..42bf410 100644
--- a/util_execute_cycle.lua
+++ b/util_execute_cycle.lua
@@ -247,8 +247,7 @@ digtron.execute_dig_cycle = function(pos, clicker)
pos = digtron.find_new_pos(pos, facing)
meta = minetest.get_meta(pos)
if move_player then
- local player_pos = clicker:getpos()
- clicker:moveto(digtron.find_new_pos(player_pos, facing), true)
+ clicker:moveto(digtron.find_new_pos(clicker:getpos(), facing), true)
end
@@ -352,8 +351,7 @@ digtron.execute_move_cycle = function(pos, clicker)
layout:write_layout_image()
pos = digtron.find_new_pos(pos, facing)
if move_player then
- local player_pos = clicker:getpos()
- clicker:moveto(digtron.find_new_pos(player_pos, facing), true)
- end
+ clicker:moveto(digtron.find_new_pos(clicker:getpos(), facing), true)
+ end
return pos, "", 0
end \ No newline at end of file