mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Merge pull request 'Fix mob-in-boat crash in Minetest 5.5-dev' (#2000) from fix-boat-crash-2 into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2000 Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
commit
cabf6e8cd1
@ -267,7 +267,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||
return
|
||||
end
|
||||
local yaw = self.object:get_yaw()
|
||||
if ctrl.up then
|
||||
if ctrl and ctrl.up then
|
||||
-- Forwards
|
||||
self._v = self._v + 0.1 * v_factor
|
||||
|
||||
@ -276,7 +276,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||
self.object:set_animation({x=0, y=40}, paddling_speed, 0, true)
|
||||
self._animation = 1
|
||||
end
|
||||
elseif ctrl.down then
|
||||
elseif ctrl and ctrl.down then
|
||||
-- Backwards
|
||||
self._v = self._v - 0.1 * v_factor
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user