mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Fix #399
This commit is contained in:
parent
4fe944445b
commit
e66d66caf9
2 changed files with 11 additions and 2 deletions
|
@ -134,7 +134,7 @@ function boat.on_death(self, killer)
|
||||||
self._driver = nil
|
self._driver = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function boat.on_step(self, dtime)
|
function boat.on_step(self, dtime, moveresult)
|
||||||
self._v = get_v(self.object:get_velocity()) * get_sign(self._v)
|
self._v = get_v(self.object:get_velocity()) * get_sign(self._v)
|
||||||
local on_water = true
|
local on_water = true
|
||||||
local in_water = false
|
local in_water = false
|
||||||
|
@ -152,6 +152,15 @@ function boat.on_step(self, dtime)
|
||||||
v_slowdown = 0.05
|
v_slowdown = 0.05
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if moveresult and moveresult.collides then
|
||||||
|
for _, collision in ipairs(moveresult.collisions) do
|
||||||
|
local pos = collision.node_pos
|
||||||
|
if collision.type == "node" and minetest.get_node_group(minetest.get_node(pos).name, "dig_by_boat") > 0 then
|
||||||
|
minetest.dig_node(pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if self._driver then
|
if self._driver then
|
||||||
local ctrl = self._driver:get_player_control()
|
local ctrl = self._driver:get_player_control()
|
||||||
if ctrl.sneak then
|
if ctrl.sneak then
|
||||||
|
|
|
@ -390,7 +390,7 @@ minetest.register_node("mcl_flowers:waterlily", {
|
||||||
liquids_pointable = true,
|
liquids_pointable = true,
|
||||||
walkable = true,
|
walkable = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1},
|
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
node_box = {
|
node_box = {
|
||||||
|
|
Loading…
Reference in a new issue