mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2024-12-24 01:30:30 +01:00
day/night sounds only play when above ground
This commit is contained in:
parent
cbf8d2f63d
commit
e6aa6b19da
@ -312,7 +312,7 @@ ambience.add_set("night", {
|
|||||||
},
|
},
|
||||||
sound_check = function(def)
|
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"
|
return "night"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@ -335,7 +335,7 @@ ambience.add_set("day", {
|
|||||||
},
|
},
|
||||||
sound_check = function(def)
|
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"
|
return "day"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user