1
0
Fork 0

Fix boat behavior a bit when falling on water

objects
Wuzzy 2019-09-11 12:50:58 +02:00
parent df7acfc8ae
commit e633f15eed
1 changed files with 1 additions and 4 deletions

View File

@ -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)