Fix item toggles where no sound exists (#24807)

Oop

(cherry picked from commit bd86447f996e10a1befda16404f0155209efa0e1)
This commit is contained in:
metalgearsloth 2024-02-01 22:43:06 +11:00 committed by Debug
parent b0dcdcb504
commit adddd74cff
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
1 changed files with 1 additions and 4 deletions

View File

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