mirror of
https://github.com/APercy/automobiles_pck
synced 2025-07-29 17:45:50 +02:00
bug fix and direction adjusts
This commit is contained in:
parent
1325758d88
commit
7465e6b57f
@ -69,13 +69,16 @@ function automobiles_lib.ground_get_distances(self, radius, axis_distance)
|
||||
if math.abs(math.deg(pitch) - math.deg(midpitch)) < 20 then
|
||||
pitch = pitch + ((pitch - midpitch) / 2)
|
||||
end
|
||||
|
||||
end
|
||||
else
|
||||
self._pitch = 0
|
||||
end
|
||||
|
||||
if math.abs(math.deg(pitch)) <= 45 then
|
||||
if math.abs(math.deg(pitch)) <= 45 and math.abs(math.deg(pitch - self._pitch)) < 20 then
|
||||
self._pitch = pitch
|
||||
else
|
||||
self._pitch = 0
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -448,6 +448,9 @@ minetest.register_entity("automobiles_roadster:roadster", {
|
||||
--control
|
||||
local steering_angle_max = 30
|
||||
local steering_speed = 40
|
||||
if math.abs(longit_speed) > 1 then
|
||||
steering_speed = steering_speed / (longit_speed/2)
|
||||
end
|
||||
accel, stop = automobiles_lib.control(self, dtime, hull_direction, longit_speed, longit_drag, later_drag, accel, roadster.max_acc_factor, roadster.max_speed, steering_angle_max, steering_speed)
|
||||
else
|
||||
if self.sound_handle ~= nil then
|
||||
|
Loading…
Reference in New Issue
Block a user