From 078069baf69603a5e9b768c888feeca471a5b7b4 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 6 Feb 2023 17:42:25 +0100 Subject: [PATCH] Fix movecontroller bug when carts are running in both directions --- basis/fly_lib.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/fly_lib.lua b/basis/fly_lib.lua index f50ea6a..24df599 100644 --- a/basis/fly_lib.lua +++ b/basis/fly_lib.lua @@ -50,7 +50,7 @@ local function set_node(item, playername) nvm.running = false M(item.base_pos):set_string("status", S("Stopped")) if ndef1 and ndef2 then - if minecart.is_cart(name) and minecart.is_rail(dest_pos, node.name) then + if minecart.is_cart(name) and (minecart.is_rail(dest_pos, node.name) or minecart.is_cart(name)) then local player = playername and minetest.get_player_by_name(playername) minecart.place_and_start_cart(dest_pos, {name = name, param2 = param2}, item.cartdef, player) return @@ -548,7 +548,7 @@ local function is_valid_dest(pos) if techage.is_air_like(node.name) then return true end - if minecart.is_rail(pos, node.name) then + if minecart.is_rail(pos, node.name) or minecart.is_cart(node.name) then return true end if not M(pos):contains("ta_move_block") then