mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Fix AudioSystem nullability checks for engine PR (#32233)
This commit is contained in:
@@ -44,11 +44,11 @@ public sealed class WeatherSystem : SharedWeatherSystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Timing.IsFirstTimePredicted || weatherProto.Sound == null
|
||||
|| weather.Stream is not null) // Don't ever generate more than one weather sound.
|
||||
if (!Timing.IsFirstTimePredicted || weatherProto.Sound == null)
|
||||
return;
|
||||
|
||||
weather.Stream ??= _audio.PlayGlobal(weatherProto.Sound, Filter.Local(), true)?.Entity;
|
||||
|
||||
if (!TryComp(weather.Stream, out AudioComponent? comp))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user