Skip to content

Commit

Permalink
Beds, boats: Replace deprecated get_look_yaw/set_look_yaw
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker authored and paramat committed Jul 27, 2016
1 parent 0ac0969 commit ea49eb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mods/beds/functions.lua
Expand Up @@ -70,7 +70,7 @@ local function lay_down(player, pos, bed_pos, state, skip)

-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
player:set_look_yaw(math.random(1, 180) / 100)
player:set_look_horizontal(math.random(1, 180) / 100)
default.player_attached[name] = false
player:set_physics_override(1, 1, 1)
hud_flags.wielditem = true
Expand All @@ -85,7 +85,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
local yaw, param2 = get_look_yaw(bed_pos)
player:set_look_yaw(yaw)
player:set_look_horizontal(yaw)
local dir = minetest.facedir_to_dir(param2)
local p = {x = bed_pos.x + dir.x / 2, y = bed_pos.y, z = bed_pos.z + dir.z / 2}
player:set_physics_override(0, 0, 0)
Expand Down
2 changes: 1 addition & 1 deletion mods/boats/init.lua
Expand Up @@ -79,7 +79,7 @@ function boat.on_rightclick(self, clicker)
minetest.after(0.2, function()
default.player_set_animation(clicker, "sit" , 30)
end)
self.object:setyaw(clicker:get_look_yaw() - math.pi / 2)
self.object:setyaw(clicker:get_look_horizontal() - math.pi / 2)
end
end

Expand Down

0 comments on commit ea49eb3

Please sign in to comment.