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