From 70d91bc64d0bc4be80adf34ff2a45971d7e1c4ac Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 26 Feb 2018 18:47:18 +0000 Subject: [PATCH] Revert "Boats: Prevent entering 'ignore' nodes" This reverts commit 7754555707a6a1bf1e8f4b57788e27e57fde1cd8. Due to recent engine commit boats now collide with 'ignore' nodes. --- mods/boats/init.lua | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/mods/boats/init.lua b/mods/boats/init.lua index 9e4e5b30..72ca478f 100644 --- a/mods/boats/init.lua +++ b/mods/boats/init.lua @@ -172,23 +172,15 @@ function boat.on_step(self, dtime) local new_velo local new_acce = {x = 0, y = 0, z = 0} if not is_water(p) then - local nodename = minetest.get_node(p).name - local nodedef = minetest.registered_nodes[nodename] - if nodename == "ignore" then - -- at world edge bounce boat back into world - self.v = -self.v - -- at world base avoid falling into ignore - new_velo = get_velocity(self.v, self.object:getyaw(), 0) - elseif (not nodedef) or nodedef.walkable then + local nodedef = minetest.registered_nodes[minetest.get_node(p).name] + if (not nodedef) or nodedef.walkable then self.v = 0 new_acce = {x = 0, y = 1, z = 0} - new_velo = get_velocity(self.v, self.object:getyaw(), - self.object:getvelocity().y) else new_acce = {x = 0, y = -9.8, z = 0} - new_velo = get_velocity(self.v, self.object:getyaw(), - self.object:getvelocity().y) end + new_velo = get_velocity(self.v, self.object:getyaw(), + self.object:getvelocity().y) self.object:setpos(self.object:getpos()) else p.y = p.y + 1