From 147ca321ff9b69d1d246607bdb23c093469c735c Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 9 Jan 2022 07:00:26 +0100 Subject: [PATCH] fix: adjust frequency of snow and snowstorm weather effects to avoid lull Closes #122 --- src/module/weatherEffects/effects/SnowWeatherEffect.js | 2 +- src/module/weatherEffects/effects/SnowstormWeatherEffect.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module/weatherEffects/effects/SnowWeatherEffect.js b/src/module/weatherEffects/effects/SnowWeatherEffect.js index 8d77c55e..cb5bd890 100644 --- a/src/module/weatherEffects/effects/SnowWeatherEffect.js +++ b/src/module/weatherEffects/effects/SnowWeatherEffect.js @@ -67,7 +67,7 @@ export class SnowWeatherEffect extends AbstractWeatherEffect { h: d.height, }, maxParticles: p, - frequency: 1 / p, + frequency: (this.constructor.CONFIG.lifetime.min + this.constructor.CONFIG.lifetime.max) / 2 / p, }, { inplace: false }, ); diff --git a/src/module/weatherEffects/effects/SnowstormWeatherEffect.js b/src/module/weatherEffects/effects/SnowstormWeatherEffect.js index 385e21a9..48fa1035 100644 --- a/src/module/weatherEffects/effects/SnowstormWeatherEffect.js +++ b/src/module/weatherEffects/effects/SnowstormWeatherEffect.js @@ -33,7 +33,7 @@ export class SnowstormWeatherEffect extends AbstractWeatherEffect { h: d.sceneRect.height, }, maxParticles: p, - frequency: 1 / p, + frequency: (this.constructor.CONFIG.lifetime.min + this.constructor.CONFIG.lifetime.max) / 2 / p, }, { inplace: false }, );