Show bubbles for any water type

This commit is contained in:
Pavel Puchkin 2016-01-10 19:26:13 +02:00
parent d22736e608
commit 227651b088

View File

@ -35,13 +35,11 @@ local function step(dtime)
player_pos.y=math.ceil(player_pos.y-0.3) player_pos.y=math.ceil(player_pos.y-0.3)
player_pos.z=math.floor(player_pos.z+0.5) player_pos.z=math.floor(player_pos.z+0.5)
local nodename=minetest.get_node(player_pos).name
if player_lastsound[name] == nil then player_lastsound[name] = 100 end if player_lastsound[name] == nil then player_lastsound[name] = 100 end
player_lastsound[name] = player_lastsound[name] + dtime player_lastsound[name] = player_lastsound[name] + dtime
if nodename == "default:water_source" or nodename == "default:river_water_source" then if minetest.get_node_group(minetest.get_node(player_pos).name, 'water') > 0 then
if player_lastsound[name] > 3.3 then if player_lastsound[name] > 3.3 then
player_soundspec[name]=minetest.sound_play( player_soundspec[name]=minetest.sound_play(
"default_water", "default_water",