mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better storms
This commit is contained in:
parent
6796fe2745
commit
6d1b46956d
@ -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),
|
||||
});
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user