mirror of
https://github.com/minetest/minetest_game.git
synced 2025-01-03 03:58:08 +01:00
Remove eye offsetting hacks
This commit is contained in:
parent
6623dec567
commit
a19ade52bc
@ -71,7 +71,6 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||
end
|
||||
player:set_pos(beds.pos[name])
|
||||
|
||||
-- physics, eye_offset, etc
|
||||
local physics_override = beds.player[name].physics_override
|
||||
beds.player[name] = nil
|
||||
player:set_physics_override({
|
||||
@ -79,7 +78,6 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||
jump = physics_override.jump,
|
||||
gravity = physics_override.gravity
|
||||
})
|
||||
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
player:set_look_horizontal(math.random(1, 180) / 100)
|
||||
player_api.player_attached[name] = false
|
||||
hud_flags.wielditem = true
|
||||
|
@ -19,14 +19,12 @@ function carts:manage_attachment(player, obj)
|
||||
|
||||
if status then
|
||||
player:set_attach(obj, "", {x=0, y=-4.5, z=0}, {x=0, y=0, z=0})
|
||||
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
||||
|
||||
-- player_api does not update the animation
|
||||
-- when the player is attached, reset to default animation
|
||||
player_api.set_animation(player, "stand")
|
||||
else
|
||||
player:set_detach()
|
||||
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user