2016-04-01 20:02:19 -04:00
|
|
|
function homedecor.sit(pos, node, clicker)
|
Huge update - lots of mods:
areas, biome_lib, blox, bobblocks, boost_cart, homedecor, mobs,
coloredwood, ilights, inbox, item_tweaks, moreblocks, moreores,
pipeworks, plasticbox, signs_lib, stainedglass, roads, unifieddyes,
vines, worldedit, xban2, maybe some others I didn't think about ;-)
2017-01-31 19:39:31 -05:00
|
|
|
return -- delete it when the engine is stabler for the player's physics
|
|
|
|
--[[
|
2016-04-01 20:02:19 -04:00
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
local param2 = node.param2
|
|
|
|
local name = clicker:get_player_name()
|
|
|
|
|
|
|
|
if name == meta:get_string("is_sit") then
|
|
|
|
meta:set_string("is_sit", "")
|
|
|
|
pos.y = pos.y-0.5
|
|
|
|
clicker:setpos(pos)
|
|
|
|
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
|
|
|
|
clicker:set_physics_override(1, 1, 1)
|
|
|
|
default.player_attached[name] = false
|
|
|
|
default.player_set_animation(clicker, "stand", 30)
|
|
|
|
else
|
|
|
|
meta:set_string("is_sit", clicker:get_player_name())
|
|
|
|
clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0})
|
|
|
|
clicker:set_physics_override(0, 0, 0)
|
|
|
|
clicker:setpos(pos)
|
|
|
|
default.player_attached[name] = true
|
|
|
|
default.player_set_animation(clicker, "sit", 30)
|
|
|
|
if param2 == 0 then
|
|
|
|
clicker:set_look_yaw(3.15)
|
|
|
|
elseif param2 == 1 then
|
|
|
|
clicker:set_look_yaw(7.9)
|
|
|
|
elseif param2 == 2 then
|
|
|
|
clicker:set_look_yaw(6.28)
|
|
|
|
elseif param2 == 3 then
|
|
|
|
clicker:set_look_yaw(4.75)
|
|
|
|
else return end
|
|
|
|
end
|
Huge update - lots of mods:
areas, biome_lib, blox, bobblocks, boost_cart, homedecor, mobs,
coloredwood, ilights, inbox, item_tweaks, moreblocks, moreores,
pipeworks, plasticbox, signs_lib, stainedglass, roads, unifieddyes,
vines, worldedit, xban2, maybe some others I didn't think about ;-)
2017-01-31 19:39:31 -05:00
|
|
|
--]]
|
2016-04-01 20:02:19 -04:00
|
|
|
end
|