mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2024-12-29 16:00:16 +01:00
Try fixing sleds a little.
This commit is contained in:
parent
2ea175600e
commit
0c08b46264
@ -179,10 +179,13 @@ minetest.register_craftitem("snow:sled", {
|
|||||||
on_use = function(itemstack, placer)
|
on_use = function(itemstack, placer)
|
||||||
local pos = {x=0,y=-1000, z=0}
|
local pos = {x=0,y=-1000, z=0}
|
||||||
local name = placer:get_player_name()
|
local name = placer:get_player_name()
|
||||||
|
local player_pos = placer:getpos()
|
||||||
if not players_sled[name] then
|
if not players_sled[name] then
|
||||||
|
if minetest.get_node({x=player_pos.x,y=player_pos.y, z=player_pos.z}).name == "default:snow" then
|
||||||
local sled = minetest.env:add_entity(pos, "snow:sled")
|
local sled = minetest.env:add_entity(pos, "snow:sled")
|
||||||
sled:get_luaentity():on_rightclick(placer)
|
sled:get_luaentity():on_rightclick(placer)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user