summaryrefslogtreecommitdiff
path: root/boost_cart/functions.lua
diff options
context:
space:
mode:
Diffstat (limited to 'boost_cart/functions.lua')
-rw-r--r--boost_cart/functions.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/boost_cart/functions.lua b/boost_cart/functions.lua
index e94ac07..fcdd1ad 100644
--- a/boost_cart/functions.lua
+++ b/boost_cart/functions.lua
@@ -6,10 +6,11 @@ function boost_cart:get_sign(z)
end
end
-function boost_cart:manage_attachment(player, status, obj)
+function boost_cart:manage_attachment(player, obj)
if not player then
return
end
+ local status = obj ~= nil
local player_name = player:get_player_name()
if default.player_attached[player_name] == status then
return
@@ -157,9 +158,9 @@ function boost_cart:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
return {x=0, y=0, z=0}
end
-function boost_cart:pathfinder(pos_, expected_pos, old_dir, ctrl, pf_switch, railtype)
+function boost_cart:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
local pos = vector.round(pos_)
- local pf_pos = vector.round(expected_pos)
+ local pf_pos = vector.round(old_pos)
local pf_dir = vector.new(old_dir)
for i = 1, 3 do
@@ -196,7 +197,7 @@ function boost_cart:register_rail(name, def)
drawtype = "raillike",
paramtype = "light",
sunlight_propagates = true,
- is_ground_content = true,
+ is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",