Skip to content

Commit ea49eb3

Browse files
SmallJokerparamat
authored andcommittedJul 27, 2016
Beds, boats: Replace deprecated get_look_yaw/set_look_yaw
1 parent 0ac0969 commit ea49eb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎mods/beds/functions.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
7070

7171
-- physics, eye_offset, etc
7272
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
73-
player:set_look_yaw(math.random(1, 180) / 100)
73+
player:set_look_horizontal(math.random(1, 180) / 100)
7474
default.player_attached[name] = false
7575
player:set_physics_override(1, 1, 1)
7676
hud_flags.wielditem = true
@@ -85,7 +85,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
8585
-- physics, eye_offset, etc
8686
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
8787
local yaw, param2 = get_look_yaw(bed_pos)
88-
player:set_look_yaw(yaw)
88+
player:set_look_horizontal(yaw)
8989
local dir = minetest.facedir_to_dir(param2)
9090
local p = {x = bed_pos.x + dir.x / 2, y = bed_pos.y, z = bed_pos.z + dir.z / 2}
9191
player:set_physics_override(0, 0, 0)

‎mods/boats/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function boat.on_rightclick(self, clicker)
7979
minetest.after(0.2, function()
8080
default.player_set_animation(clicker, "sit" , 30)
8181
end)
82-
self.object:setyaw(clicker:get_look_yaw() - math.pi / 2)
82+
self.object:setyaw(clicker:get_look_horizontal() - math.pi / 2)
8383
end
8484
end
8585

0 commit comments

Comments
 (0)
Please sign in to comment.