Better storms

This commit is contained in:
Joshua Barretto 2022-07-09 00:14:59 +01:00
parent 6796fe2745
commit 6d1b46956d
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ impl WeatherSim {
) * 200.0
* (1.0 - pressure);
if cell.rain > 0.02 && cell.cloud > 0.05 && thread_rng().gen_bool(0.01) {
if cell.rain > 0.1 && cell.cloud > 0.12 && thread_rng().gen_bool(0.01) {
outcomes.emit_now(Outcome::Lightning {
pos: wpos.map(|e| e as f32).with_z(self.consts[point].alt),
});

View File

@ -434,9 +434,9 @@ impl SfxMgr {
);
},
Outcome::Lightning { pos } => {
let power = (1.0 - pos.distance(audio.listener.pos) / 3_500.0)
let power = (1.0 - pos.distance(audio.listener.pos) / 6_000.0)
.clamped(0.0, 1.0)
.powf(0.5);
.powf(0.75);
if power > 0.0 {
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::Lightning);
// TODO: Don't use UI sfx, add a way to control position falloff