Pass CollisionMask to the sound systems (#968)
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.GameObjects.Components.Instruments;
|
using Content.Shared.GameObjects.Components.Instruments;
|
||||||
|
using Content.Shared.Physics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using NFluidsynth;
|
using NFluidsynth;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -110,6 +111,7 @@ namespace Content.Client.GameObjects.Components.Instruments
|
|||||||
if (IsRendererAlive)
|
if (IsRendererAlive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_midiManager.OcclusionCollisionMask = (int) CollisionGroup.Impassable;
|
||||||
_renderer = _midiManager.GetNewRenderer();
|
_renderer = _midiManager.GetNewRenderer();
|
||||||
|
|
||||||
if (_renderer != null)
|
if (_renderer != null)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.GameObjects.Components.Sound;
|
using Content.Shared.GameObjects.Components.Sound;
|
||||||
|
using Content.Shared.Physics;
|
||||||
using Robust.Client.GameObjects.EntitySystems;
|
using Robust.Client.GameObjects.EntitySystems;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.GameObjects.Systems;
|
using Robust.Shared.GameObjects.Systems;
|
||||||
@@ -89,7 +90,7 @@ namespace Content.Client.GameObjects.Components.Sound
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
EntitySystem.TryGet(out _audioSystem);
|
if (EntitySystem.TryGet(out _audioSystem)) _audioSystem.OcclusionCollisionMask = (int) CollisionGroup.Impassable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ExposeData(ObjectSerializer serializer)
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
|
|||||||
Reference in New Issue
Block a user