Instrument checks connection status before sending stop component message.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Instruments;
|
using Content.Shared.Instruments;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
|
using Robust.Client;
|
||||||
using Robust.Client.Audio.Midi;
|
using Robust.Client.Audio.Midi;
|
||||||
using Robust.Shared.Audio.Midi;
|
using Robust.Shared.Audio.Midi;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -255,7 +256,7 @@ namespace Content.Client.Instruments
|
|||||||
_renderer = null;
|
_renderer = null;
|
||||||
_midiEventBuffer.Clear();
|
_midiEventBuffer.Clear();
|
||||||
|
|
||||||
if (!fromStateChange)
|
if (!fromStateChange && IoCManager.Resolve<INetManager>().IsConnected)
|
||||||
{
|
{
|
||||||
SendNetworkMessage(new InstrumentStopMidiMessage());
|
SendNetworkMessage(new InstrumentStopMidiMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user