Skip to content

Commit

Permalink
Don't play weather sound if weather is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AntumDeluge committed May 28, 2024
1 parent 9e4ef51 commit a7bdde5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/stendhal/util/WeatherRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7bdde5

Please sign in to comment.