improved steering intensity configs
This commit is contained in:
parent
478b0a17ea
commit
eb1fa053c6
@ -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({
|
||||
|
@ -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({
|
||||
|
@ -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))
|
||||
|
@ -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({
|
||||
|
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user