]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix cooking sizzle noise (#31096)
authorthemias <89101928+themias@users.noreply.github.com>
Mon, 19 Aug 2024 03:01:43 +0000 (23:01 -0400)
committerGitHub <noreply@github.com>
Mon, 19 Aug 2024 03:01:43 +0000 (21:01 -0600)
Content.Server/Construction/Completions/PlaySound.cs

index 50b705ddfeb1c63866bcbc39590009e4d51e6f11..75e0153922eebcc220ed680518bc607d44f6cdf3 100644 (file)
@@ -22,8 +22,9 @@ namespace Content.Server.Construction.Completions
         public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
         {
             var scale = (float) IoCManager.Resolve<IRobustRandom>().NextGaussian(1, Variation);
-            entityManager.EntitySysManager.GetEntitySystem<SharedAudioSystem>()
-                .PlayPvs(Sound, uid, AudioParams.WithPitchScale(scale));
+            if (entityManager.TryGetComponent<TransformComponent>(uid, out var xform))
+                entityManager.EntitySysManager.GetEntitySystem<SharedAudioSystem>()
+                .PlayPvs(Sound, xform.Coordinates, AudioParams.WithPitchScale(scale));
         }
     }
 }