mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Increase max. speed of boats
This commit is contained in:
parent
e633f15eed
commit
30a954b874
1 changed files with 8 additions and 3 deletions
|
@ -221,9 +221,6 @@ function boat.on_step(self, dtime)
|
|||
if s ~= get_sign(self._v) then
|
||||
self._v = 0
|
||||
end
|
||||
if math.abs(self._v) > 5 then
|
||||
self._v = 5 * get_sign(self._v)
|
||||
end
|
||||
|
||||
p.y = p.y - boat_y_offset
|
||||
local new_velo
|
||||
|
@ -256,6 +253,14 @@ function boat.on_step(self, dtime)
|
|||
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_acceleration(new_acce)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue