Skip to content

Commit 81c5b6b

Browse files
authoredApr 23, 2020
beds: Use player_api functions instead of default (#2654)
1 parent 52c6921 commit 81c5b6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

Diff for: ‎mods/beds/functions.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ local function lay_down(player, pos, bed_pos, state, skip)
7474
-- physics, eye_offset, etc
7575
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
7676
player:set_look_horizontal(math.random(1, 180) / 100)
77-
default.player_attached[name] = false
77+
player_api.player_attached[name] = false
7878
player:set_physics_override(1, 1, 1)
7979
hud_flags.wielditem = true
80-
default.player_set_animation(player, "stand" , 30)
80+
player_api.set_animation(player, "stand" , 30)
8181

8282
-- lay down
8383
else
@@ -99,9 +99,9 @@ local function lay_down(player, pos, bed_pos, state, skip)
9999
}
100100
player:set_physics_override(0, 0, 0)
101101
player:set_pos(p)
102-
default.player_attached[name] = true
102+
player_api.player_attached[name] = true
103103
hud_flags.wielditem = false
104-
default.player_set_animation(player, "lay" , 0)
104+
player_api.set_animation(player, "lay" , 0)
105105
end
106106

107107
player:hud_set_flags(hud_flags)

0 commit comments

Comments
 (0)
Please sign in to comment.