From a7bdde5331d048ac7b57ae96f922c6a7be79636e Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Tue, 28 May 2024 04:59:54 -0700 Subject: [PATCH] Don't play weather sound if weather is disabled --- src/js/stendhal/util/WeatherRenderer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/stendhal/util/WeatherRenderer.ts b/src/js/stendhal/util/WeatherRenderer.ts index df670195fc9..b4002533af3 100644 --- a/src/js/stendhal/util/WeatherRenderer.ts +++ b/src/js/stendhal/util/WeatherRenderer.ts @@ -75,6 +75,10 @@ export class WeatherRenderer { */ update(weather?: string) { this.enabled = stendhal.config.getBoolean("effect.weather"); + if (!this.enabled) { + // prevent playing sound & other weather-related instructions + return; + } this.frameIdx = 0; this.lastUpdate = Date.now(); // reset warning messages