mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 06:43:45 +01:00
Increase max. speed of boats
parent
e633f15eed
commit
30a954b874
@ -221,9 +221,6 @@ function boat.on_step(self, dtime)
|
|||||||
if s ~= get_sign(self._v) then
|
if s ~= get_sign(self._v) then
|
||||||
self._v = 0
|
self._v = 0
|
||||||
end
|
end
|
||||||
if math.abs(self._v) > 5 then
|
|
||||||
self._v = 5 * get_sign(self._v)
|
|
||||||
end
|
|
||||||
|
|
||||||
p.y = p.y - boat_y_offset
|
p.y = p.y - boat_y_offset
|
||||||
local new_velo
|
local new_velo
|
||||||
@ -256,6 +253,14 @@ function boat.on_step(self, dtime)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Terminal velocity: 8 m/s per axis of travel
|
||||||
|
for _,axis in pairs({"z","y","x"}) do
|
||||||
|
if math.abs(new_velo[axis]) > 8 then
|
||||||
|
new_velo[axis] = 8 * get_sign(new_velo[axis])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self.object:set_velocity(new_velo)
|
self.object:set_velocity(new_velo)
|
||||||
self.object:set_acceleration(new_acce)
|
self.object:set_acceleration(new_acce)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user