mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
correcao do tug
This commit is contained in:
parent
02d1833531
commit
ecfb31d166
2 changed files with 22 additions and 2 deletions
|
@ -93,6 +93,24 @@ minetest.register_node("airutils:papi",{
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function airutils.remove_papi(pos)
|
||||||
|
local meta = core.get_meta(pos)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local dir=node.param2
|
||||||
|
if node.name == "airutils:papi_right" then
|
||||||
|
core.set_node(pos, {name="airutils:papi", param2=dir})
|
||||||
|
meta:set_string("infotext", "PAPI - left side\rOwned by: "..player_name)
|
||||||
|
end
|
||||||
|
|
||||||
|
meta:set_string("owner", player_name)
|
||||||
|
meta:set_string("dont_destroy", "false")
|
||||||
|
|
||||||
|
if meta:get_string("dont_destroy") == "true" then
|
||||||
|
-- when swapping it
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- PAPI right node
|
-- PAPI right node
|
||||||
minetest.register_node("airutils:papi_right",{
|
minetest.register_node("airutils:papi_right",{
|
||||||
description = "PAPI_right_side",
|
description = "PAPI_right_side",
|
||||||
|
|
|
@ -20,8 +20,10 @@ function airutils.move_target(player, pointed_thing)
|
||||||
|
|
||||||
if player:get_player_control().sneak == true then
|
if player:get_player_control().sneak == true then
|
||||||
local rotation = object:get_rotation()
|
local rotation = object:get_rotation()
|
||||||
rotation.y = yaw + math.rad(180)
|
if rotation then
|
||||||
object:set_rotation(rotation)
|
rotation.y = yaw + math.rad(180)
|
||||||
|
object:set_rotation(rotation)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if is_airlike then object:set_pos(obj_pos) end
|
if is_airlike then object:set_pos(obj_pos) end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue