day/night sounds only play when above ground

This commit is contained in:
TenPlus1 2018-11-02 13:37:11 +00:00
parent cbf8d2f63d
commit e6aa6b19da
1 changed files with 2 additions and 2 deletions

View File

@ -312,7 +312,7 @@ ambience.add_set("night", {
},
sound_check = function(def)
if def.tod < 0.2 or def.tod > 0.8 then
if (def.tod < 0.2 or def.tod > 0.8) and def.pos.y > -10 then
return "night"
end
end,
@ -335,7 +335,7 @@ ambience.add_set("day", {
},
sound_check = function(def)
if def.tod > 0.2 and def.tod < 0.8 then
if (def.tod > 0.2 and def.tod < 0.8) and def.pos.y > -10 then
return "day"
end
end,