Fix AudioSystem nullability checks for engine PR (#32233)

This commit is contained in:
Leon Friedrich
2024-09-18 13:43:30 +12:00
committed by GitHub
parent 675a9197f2
commit 974c08596b
11 changed files with 21 additions and 16 deletions

View File

@@ -185,7 +185,7 @@ public sealed partial class ContentAudioSystem
false,
_lobbySoundtrackParams.WithVolume(_lobbySoundtrackParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume)))
);
if (playResult.Value.Entity == default)
if (playResult == null)
{
_sawmill.Warning(
$"Tried to play lobby soundtrack '{{Filename}}' using {nameof(SharedAudioSystem)}.{nameof(SharedAudioSystem.PlayGlobal)} but it returned default value of EntityUid!",