.27 bugfix: removed beach waves when treading water

This commit is contained in:
Neuromancer 2012-09-14 20:51:10 -05:00
parent ac6c5487dd
commit 5d0bb2a72e
3 changed files with 9 additions and 8 deletions

Binary file not shown.

View File

@ -1,8 +1,7 @@
-------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------
--Ambiance Configuration for version .26 --Ambiance Configuration for version .27
--reduced silence between swimming sounds --Fixed removed occasional beach wave sound when treading water
--reduce number of splashes when transitioning -- was caused by the bottom node we find is air which leads to surface noise!
--compressed swimming files.
local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000. local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000.
@ -251,6 +250,7 @@ local get_ambience = function(player)
local water_surface_found = false local water_surface_found = false
pos.y = pos.y+1.2 pos.y = pos.y+1.2
local nodename = minetest.env:get_node(pos).name local nodename = minetest.env:get_node(pos).name
--minetest.chat_send_all("top nodename found(" .. nodename .. ")")
if string.find(nodename, "default:water") then if string.find(nodename, "default:water") then
if music then if music then
return {water=water, water_frequent=water_frequent, music=music} return {water=water, water_frequent=water_frequent, music=music}
@ -258,13 +258,14 @@ local get_ambience = function(player)
return {water=water, water_frequent=water_frequent} return {water=water, water_frequent=water_frequent}
end end
elseif nodename == "air" then elseif nodename == "air" then
pos.y = pos.y-1.15 --1.8 pos.y = pos.y-1.19 --1.8
local nodename = minetest.env:get_node(pos).name local nodename = minetest.env:get_node(pos).name
--minetest.chat_send_all("nodename found(" .. nodename .. ")") --minetest.chat_send_all("bottom nodename found(" .. nodename .. ")")
pos.y = pos.y+0.95 --1.6 pos.y = pos.y+0.99 --1.6
if string.find(nodename, "default:water") then if string.find(nodename, "default:water") then
--minetest.chat_send_all("bottom counted as water")
if last_x_pos ~=pos.x or last_z_pos ~=pos.z then if last_x_pos ~=pos.x or last_z_pos ~=pos.z then
--minetest.chat_send_all("swimming move found")
last_x_pos =pos.x last_x_pos =pos.x
last_z_pos =pos.z last_z_pos =pos.z
if music then if music then

BIN
ambience26.zip Normal file

Binary file not shown.