From 2848060f63575f05969072c29cc0af74dfb0491e Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 11 Jan 2025 15:40:15 -0500 Subject: [PATCH] Fixes Weather Soundspam(And Crash) (#1501) # Description Pretty simple fix, just tell the weather system "If there's already a weather sound playing, stop.". I have infact tested this, and verified that this fix does work. Fixes https://github.com/Simple-Station/Einstein-Engines/issues/1285 # Changelog :cl: - fix: Fixed a crash caused by Weather System creating millions of sounds. (cherry picked from commit 28415f18a1cb2549e9faa29c1ce66889dc0ef323) --- Content.Client/Weather/WeatherSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/Weather/WeatherSystem.cs b/Content.Client/Weather/WeatherSystem.cs index 89c146b823..55100e751e 100644 --- a/Content.Client/Weather/WeatherSystem.cs +++ b/Content.Client/Weather/WeatherSystem.cs @@ -44,7 +44,8 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype return; } - if (!Timing.IsFirstTimePredicted || weatherProto.Sound == null) + if (!Timing.IsFirstTimePredicted || weatherProto.Sound == null + || weather.Stream is not null) // Don't ever generate more than one weather sound. return; // WD EDIT START