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

@@ -155,7 +155,7 @@ public sealed class MechGrabberSystem : EntitySystem
return;
args.Handled = true;
component.AudioStream = _audio.PlayPvs(component.GrabSound, uid).Value.Entity;
component.AudioStream = _audio.PlayPvs(component.GrabSound, uid)?.Entity;
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, component.GrabDelay, new GrabberDoAfterEvent(), uid, target: target, used: uid)
{
BreakOnMove = true