Replace deprecated set_physics_override call

This commit is contained in:
sfan5 2024-04-28 11:07:37 +02:00
parent 71bff8a884
commit 52ce4f7b94

View File

@ -35,7 +35,7 @@ if ts_furniture.enable_sitting then
end end
player:move_to(pos) player:move_to(pos)
player:set_eye_offset({x = 0, y = -7, z = 2}, {x = 0, y = 0, z = 0}) player:set_eye_offset({x = 0, y = -7, z = 2}, {x = 0, y = 0, z = 0})
player:set_physics_override(0, 0, 0) player:set_physics_override({speed = 0, jump = 0, gravity = 0})
player_api.player_attached[name] = true player_api.player_attached[name] = true
minetest.after(0.1, function() minetest.after(0.1, function()
if player then if player then
@ -56,7 +56,8 @@ if ts_furniture.enable_sitting then
ts_furniture.stand = function(player, name) ts_furniture.stand = function(player, name)
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
player:set_physics_override(1, 1, 1) -- FIXME: should remember old values or use player_monoids
player:set_physics_override({speed = 1, jump = 1, gravity = 1})
player_api.player_attached[name] = false player_api.player_attached[name] = false
player_api.set_animation(player, "stand", 30) player_api.set_animation(player, "stand", 30)
end end