Small audio fixes; addresses #939 and #940

This commit is contained in:
DaforLynx 2021-01-29 11:37:10 +00:00 committed by Marcel
parent 4c7da15d85
commit c6e262c4ce
4 changed files with 10 additions and 6 deletions

View File

@ -32,7 +32,7 @@
files: [
"voxygen.audio.sfx.ambient.crickets_1",
],
threshold: 3.0,
threshold: 1.0,
),
Frog: (
files: [

View File

@ -59,7 +59,7 @@
"If you want to join the Dev-Team or just have a chat with us join our Discord-Server.",
"You can toggle showing your amount of health on the healthbar in the settings.",
"In order to see your stats click the 'Stats' button in the inventory.",
"Sit near a campfire (with the 'K' key) to rest - receiving a slow heal-over-time.",
"Sit near a campfire (with the 'K' key) to slowly recover from your injuries.",
"Need more bags or better armor to continue your journey? Press 'C' to open the crafting menu!",
],
"npc.speech.villager_under_attack": [

View File

@ -928,9 +928,9 @@ impl Client {
terrain_alt = chunk.meta().alt();
contains_cave = chunk.meta().contains_cave();
}
if player_alt < (terrain_alt - 15.0) && contains_cave {
if player_alt < (terrain_alt - 25.0) && contains_cave {
SitesKind::Cave
} else if player_alt < (terrain_alt - 15.0) {
} else if player_alt < (terrain_alt - 25.0) {
SitesKind::Dungeon
} else {
SitesKind::Void

View File

@ -148,8 +148,9 @@ impl EventMapper for BlockEventMapper {
// TODO Address bird hack properly. See TODO on line 171
if !(sounds.cond)(state)
|| player_pos.0.z < (terrain_alt - 30.0)
|| ((sounds.sfx == SfxEvent::Birdcall || sounds.sfx == SfxEvent::Owl)
&& thread_rng().gen_bool(0.995))
|| (sounds.sfx == SfxEvent::Birdcall && thread_rng().gen_bool(0.995))
|| (sounds.sfx == SfxEvent::Owl && thread_rng().gen_bool(0.998))
|| (sounds.sfx == SfxEvent::Cricket && thread_rng().gen_bool(0.95))
{
continue;
}
@ -173,6 +174,7 @@ impl EventMapper for BlockEventMapper {
// Hack to reduce the number of bird sounds (too many leaf blocks)
if (sounds.sfx == SfxEvent::Birdcall || sounds.sfx == SfxEvent::Owl)
&& thread_rng().gen_bool(0.999)
|| (sounds.sfx == SfxEvent::Cricket && thread_rng().gen_bool(0.999))
{
continue;
}
@ -229,6 +231,8 @@ impl BlockEventMapper {
) -> bool {
if let Some((event, item)) = sfx_trigger_item {
if &previous_state.event == event {
//In case certain sounds need modification to their threshold,
//use match event
previous_state.time.elapsed().as_secs_f32() >= item.threshold
} else {
true