set pos changed

This commit is contained in:
Alexsandro Percy 2022-02-11 07:53:50 -03:00
parent 1c5c870321
commit 881db52904
3 changed files with 3 additions and 3 deletions

View File

@ -490,6 +490,7 @@ minetest.register_entity("automobiles_buggy:buggy", {
end
local curr_pos = self.object:get_pos()
self.object:move_to(curr_pos)
if is_attached then --and self.driver_name == self.owner then
local impact = automobiles_lib.get_hipotenuse_value(velocity, self.lastvelocity)
if impact > 1 then
@ -612,7 +613,6 @@ minetest.register_entity("automobiles_buggy:buggy", {
accel.y = -automobiles_lib.gravity
if stop ~= true then
self.object:move_to(curr_pos)
self.object:set_velocity(velocity)
self.object:set_acceleration(accel)
else

View File

@ -497,6 +497,7 @@ minetest.register_entity("automobiles_coupe:coupe", {
end
local curr_pos = self.object:get_pos()
self.object:move_to(curr_pos)
if is_attached then --and self.driver_name == self.owner then
local impact = automobiles_lib.get_hipotenuse_value(velocity, self.lastvelocity)
if impact > 1 then
@ -640,7 +641,6 @@ minetest.register_entity("automobiles_coupe:coupe", {
accel.y = -automobiles_lib.gravity
if stop ~= true then
self.object:move_to(curr_pos)
self.object:set_velocity(velocity)
self.object:set_acceleration(accel)
else

View File

@ -463,6 +463,7 @@ minetest.register_entity("automobiles_roadster:roadster", {
end
local curr_pos = self.object:get_pos()
self.object:move_to(curr_pos)
if is_attached then --and self.driver_name == self.owner then
local impact = automobiles_lib.get_hipotenuse_value(velocity, self.lastvelocity)
if impact > 1 then
@ -585,7 +586,6 @@ minetest.register_entity("automobiles_roadster:roadster", {
accel.y = -automobiles_lib.gravity
if stop ~= true then
self.object:move_to(curr_pos)
self.object:set_velocity(velocity)
self.object:set_acceleration(accel)
else