mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +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
|
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 a new issue