From ab901e8683e034c8ee7a146e7166d5aae049bb7f Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Thu, 10 Feb 2022 14:05:24 -0300 Subject: [PATCH] try to fix jerky entity --- automobiles_lib/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automobiles_lib/init.lua b/automobiles_lib/init.lua index 98f7d98..91adabd 100755 --- a/automobiles_lib/init.lua +++ b/automobiles_lib/init.lua @@ -98,6 +98,7 @@ function automobiles_lib.attach_driver(self, player) minetest.after(0.2, function() player = minetest.get_player_by_name(name) if player then + player:set_properties({physical=false}) player_api.set_animation(player, "sit") --apply_physics_override(player, {speed=0,gravity=0,jump=0}) end @@ -125,6 +126,7 @@ function automobiles_lib.dettach_driver(self, player) if player then --automobiles_lib.remove_hud(player) + player:set_properties({physical=true}) player:set_detach() player_api.player_attached[name] = nil player:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0}) @@ -154,6 +156,7 @@ function automobiles_lib.attach_pax(self, player, onside) minetest.after(0.2, function() player = minetest.get_player_by_name(name) if player then + player:set_properties({physical=false}) player_api.set_animation(player, "sit") --apply_physics_override(player, {speed=0,gravity=0,jump=0}) end @@ -214,6 +217,7 @@ function automobiles_lib.dettach_pax(self, player) -- detach the player if player then + player:set_properties({physical=true}) player:set_detach() player_api.player_attached[name] = nil player_api.set_animation(player, "stand")