improved steering intensity configs

This commit is contained in:
Alexsandro Percy 2022-09-13 06:59:32 -03:00
parent 478b0a17ea
commit eb1fa053c6
5 changed files with 7 additions and 1 deletions

View File

@ -295,6 +295,7 @@ minetest.register_entity("automobiles_buggy:buggy", {
_inv = nil,
_inv_id = "",
_change_color = automobiles_lib.paint,
_intensity = 4,
get_staticdata = function(self) -- unloaded/unloads ... is now saved
return minetest.serialize({

View File

@ -291,6 +291,7 @@ minetest.register_entity("automobiles_coupe:coupe", {
_inv = nil,
_inv_id = "",
_change_color = automobiles_lib.paint,
_intensity = 4,
get_staticdata = function(self) -- unloaded/unloads ... is now saved
return minetest.serialize({

View File

@ -32,7 +32,9 @@ function automobiles_lib.set_yaw_by_mouse(self, dir, steering_limit)
if rot_y >= 270 and dir <= 90 then dir = dir + 360 end
if rot_y <= 90 and dir >= 270 then dir = dir - 360 end
local command = (rot_y - dir) * 2
local intensity = 2
if self._intensity then intensity = self._intensity end
local command = (rot_y - dir) * intensity
if command < -90 then command = -90
elseif command > 90 then command = 90 end
--minetest.chat_send_all("rotation y: "..rot_y.." - dir: "..dir.." - command: "..(rot_y - dir))

View File

@ -153,6 +153,7 @@ minetest.register_entity("automobiles_motorcycle:motorcycle", {
_inv = nil,
_inv_id = "",
_change_color = automobiles_lib.paint,
_intensity = 2,
get_staticdata = function(self) -- unloaded/unloads ... is now saved
return minetest.serialize({

View File

@ -276,6 +276,7 @@ minetest.register_entity("automobiles_roadster:roadster", {
_inv = nil,
_inv_id = "",
_change_color = automobiles_lib.paint,
_intensity = 4,
get_staticdata = function(self) -- unloaded/unloads ... is now saved
return minetest.serialize({