Fix item toggles where no sound exists (#24807)

Oop
This commit is contained in:
metalgearsloth
2024-02-01 22:43:06 +11:00
committed by GitHub
parent 628e22ba02
commit bd86447f99

View File

@@ -134,10 +134,7 @@ public abstract class SharedItemToggleSystem : EntitySystem
_light.SetEnabled(uid, true, light); _light.SetEnabled(uid, true, light);
} }
SoundSpecifier? soundToPlay = itemToggle.SoundActivate; var soundToPlay = itemToggle.SoundActivate;
if (soundToPlay == null)
return;
if (predicted) if (predicted)
_audio.PlayPredicted(soundToPlay, uid, user); _audio.PlayPredicted(soundToPlay, uid, user);