Fix movecontroller bug when carts are running in both directions
This commit is contained in:
parent
07fcfafedf
commit
078069baf6
@ -50,7 +50,7 @@ local function set_node(item, playername)
|
|||||||
nvm.running = false
|
nvm.running = false
|
||||||
M(item.base_pos):set_string("status", S("Stopped"))
|
M(item.base_pos):set_string("status", S("Stopped"))
|
||||||
if ndef1 and ndef2 then
|
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)
|
local player = playername and minetest.get_player_by_name(playername)
|
||||||
minecart.place_and_start_cart(dest_pos, {name = name, param2 = param2}, item.cartdef, player)
|
minecart.place_and_start_cart(dest_pos, {name = name, param2 = param2}, item.cartdef, player)
|
||||||
return
|
return
|
||||||
@ -548,7 +548,7 @@ local function is_valid_dest(pos)
|
|||||||
if techage.is_air_like(node.name) then
|
if techage.is_air_like(node.name) then
|
||||||
return true
|
return true
|
||||||
end
|
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
|
return true
|
||||||
end
|
end
|
||||||
if not M(pos):contains("ta_move_block") then
|
if not M(pos):contains("ta_move_block") then
|
||||||
|
Loading…
Reference in New Issue
Block a user