added 0.4.17 and 5.0 check for player offset
parent
789e849364
commit
79755af38d
|
@ -6,6 +6,12 @@ function carts:get_sign(z)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 0.4.17 or 5.0 check
|
||||||
|
local y_off = 6
|
||||||
|
if minetest.registered_nodes["default:permafrost"] then
|
||||||
|
y_off = -4.5
|
||||||
|
end
|
||||||
|
|
||||||
function carts:manage_attachment(player, obj)
|
function carts:manage_attachment(player, obj)
|
||||||
if not player then
|
if not player then
|
||||||
return
|
return
|
||||||
|
@ -20,7 +26,7 @@ function carts:manage_attachment(player, obj)
|
||||||
default.player_attached[player_name] = status
|
default.player_attached[player_name] = status
|
||||||
|
|
||||||
if status then
|
if status then
|
||||||
player:set_attach(obj, "", {x=0, y=6, z=0}, {x=0, y=0, z=0})
|
player:set_attach(obj, "", {x=0, y=y_off, z=0}, {x=0, y=0, z=0})
|
||||||
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
||||||
else
|
else
|
||||||
player:set_detach()
|
player:set_detach()
|
||||||
|
|
Loading…
Reference in New Issue