mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Fix boats moving too fast backwards
This commit is contained in:
parent
041839fd1a
commit
a9ed14c4af
1 changed files with 2 additions and 2 deletions
|
@ -213,9 +213,9 @@ function boat.on_step(self, dtime)
|
|||
end
|
||||
local s = get_sign(self._v)
|
||||
if not on_water and not in_water and math.abs(self._v) > 0.25 then
|
||||
v_slowdown = math.min(self._v - 0.25, v_slowdown * 5)
|
||||
v_slowdown = math.min(math.abs(self._v) - 0.25, v_slowdown * 5)
|
||||
elseif in_water and math.abs(self._v) > 0.5 then
|
||||
v_slowdown = math.min(self._v - 0.5, v_slowdown * 5)
|
||||
v_slowdown = math.min(math.abs(self._v) - 0.5, v_slowdown * 5)
|
||||
end
|
||||
self._v = self._v - v_slowdown * s
|
||||
if s ~= get_sign(self._v) then
|
||||
|
|
Loading…
Reference in a new issue