mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-23 02:51:06 +01:00
Fix boat behavior a bit when falling on water
This commit is contained in:
parent
df7acfc8ae
commit
e633f15eed
1 changed files with 1 additions and 4 deletions
|
@ -248,11 +248,8 @@ function boat.on_step(self, dtime)
|
|||
else
|
||||
-- On top of water
|
||||
new_acce = {x = 0, y = 0, z = 0}
|
||||
if math.abs(self.object:get_velocity().y) < 1 then
|
||||
local pos = self.object:get_pos()
|
||||
pos.y = math.floor(pos.y) + boat_y_offset
|
||||
if math.abs(self.object:get_velocity().y) < 0 then
|
||||
new_velo = get_velocity(self._v, self.object:get_yaw(), 0)
|
||||
self.object:set_pos(pos)
|
||||
else
|
||||
new_velo = get_velocity(self._v, self.object:get_yaw(),
|
||||
self.object:get_velocity().y)
|
||||
|
|
Loading…
Reference in a new issue