From 1c34cbab7a9b7043549901e182cab9111d5b935a Mon Sep 17 00:00:00 2001 From: Neuromancer Date: Wed, 19 Sep 2012 21:14:33 -0500 Subject: [PATCH] .31 Fixed bug in flying start sound .31 Fix bug in .29 & .30- now only plays flying start effect when lots of air under feet. --- ambience.zip | Bin 9514791 -> 9514875 bytes ambience/init.lua | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ambience.zip b/ambience.zip index a62a636beac88a7d0e8029997fe6c77c2a4aaa17..93fdc0aa93977c69a818163f8686cd7fa461319f 100644 GIT binary patch delta 5802 zcmZA52QVFN*f(%Tjoy3jy|?JW(M9j%=snR1B97>tLs%ucC=p$h5Tdu}(TScQ2oWJ6 zy!SKT%s216Gy9v_|Fzd$c6MfGb}PROU|s_asuV;TRpQEL2A(>1q-bbH?wN)ZJjnSV zZ(=Vs{YVVVZO%q{MHY(JwX3lYcQVR57v%(za^jA1t>+$148qkPI!}gjX{T;nZs_DX zW|V$~T-VO*@2s=!o@F#svmxU0Rmq%6;+L&Bj#9aKZxy>=vF%Nt@^9lGWK}2_jd0bls{dK3*bIDN^H)-F`^pBT*W@a+i#A>;Wyb;94W3~afaz! zhS6e^T4VEG(o8pI#czy9?4`1QXWiqNULdNm^;(W~Jy`X=P%jhdCT|N-uAg~P=gMn^&Nh!;rbr^*4Fyw;~jh5dq69uiT9L$f+G=vMjZBW%97defT$Up&#xU3t~+zM1u|Adry7KT?dF2>Tp^OvDV z2>4Tj4>|%_=wqW-w2oPkHVJe5WF5MFdxBGMYJvtmGE98}I3K>`fIA{#idTa7LrH3I zqkTy%ZR#=>Qs@Y|Yq87^B{ zT&sOUb@h$Y)0$}xd?tZ5$`iei1{t{F;dItJiOW3SE}VxpmJ^{`QF+c}2?>b)AeCQ< zmGaeiXRq%kCR2}$apmVD1M67bGcd26po8e3gXit5FNpJ>ESdr#YeO=Tm;E})@ORiktrX(XI`RI1eP8&DhT z#dC$Ds9hOGBhHA&YztK9rsKmb^N3qH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ambience/init.lua @@ -1,8 +1,9 @@ -------------------------------------------------------------------------------------------------------- ---Ambience Configuration for version .30 ---added music volume /mvol 0-3.3 music gain gets multiplied by this. ---added sound volume /mvol 0-1 sound gain gets multiplied by this. +--Ambience Configuration for version .31 --Working on: +--removing magic leap when not enough air under feet. + + --find out why wind stops while flying --add an extra node near feet to handle treading water as a special case, and don't have to use node under feet. which gets --invoked when staning on a ledge near water. @@ -240,7 +241,7 @@ local nodes_in_coords = function(minp, maxp, node_name) end local atleast_nodes_in_grid = function(pos, search_distance, height, node_name, threshold) --- counter = counter +1 + counter = counter +1 -- minetest.chat_send_all("counter: (" .. counter .. ")") minp = {x=pos.x-search_distance,y=height, z=pos.z+20} maxp = {x=pos.x+search_distance,y=height, z=pos.z+20} @@ -384,9 +385,18 @@ local get_ambience = function(player) -- minetest.chat_send_all("n3uf:" ..node_3_under_feet) -- local air_or_ignore = {air=true,ignore=true} + minp = {x=pos.x-3,y=pos.y-4, z=pos.z-3} + maxp = {x=pos.x+3,y=pos.y-1, z=pos.z+3} + local air_under_player = nodes_in_coords(minp, maxp, "air") + local ignore_under_player = nodes_in_coords(minp, maxp, "ignore") + air_plus_ignore_under = air_under_player + ignore_under_player +-- minetest.chat_send_all("airUnder:" ..air_under_player) +-- minetest.chat_send_all("ignoreUnder:" ..ignore_under_player) +-- minetest.chat_send_all("a+i:" ..air_plus_ignore_under) +-- minetest.chat_send_all("counter: (" .. counter .. "-----------------)") --minetest.chat_send_all(air_or_ignore[node_under_feet]) if (player_is_moving_horiz or player_is_climbing) and air_or_ignore[node_at_upper_body] and air_or_ignore[node_at_lower_body] - and air_or_ignore[node_under_feet] and air_or_ignore[node_3_under_feet] and not player_is_descending then + and air_or_ignore[node_under_feet] and air_plus_ignore_under == 196 and not player_is_descending then --minetest.chat_send_all("flying!!!!") if music then return {flying=flying, music=music}