Fix a bunch of returns where they should not be (#5640)
This commit is contained in:
@@ -322,7 +322,7 @@ namespace Content.Client.Instruments
|
|||||||
UpdateRenderer(instrument.OwnerUid, instrument);
|
UpdateRenderer(instrument.OwnerUid, instrument);
|
||||||
|
|
||||||
if (!instrument.IsMidiOpen && !instrument.IsInputOpen)
|
if (!instrument.IsMidiOpen && !instrument.IsInputOpen)
|
||||||
return;
|
continue;
|
||||||
|
|
||||||
var now = _gameTiming.RealTime;
|
var now = _gameTiming.RealTime;
|
||||||
var oneSecAGo = now.Add(OneSecAgo);
|
var oneSecAGo = now.Add(OneSecAgo);
|
||||||
@@ -333,7 +333,7 @@ namespace Content.Client.Instruments
|
|||||||
instrument.SentWithinASec = 0;
|
instrument.SentWithinASec = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instrument.MidiEventBuffer.Count == 0) return;
|
if (instrument.MidiEventBuffer.Count == 0) continue;
|
||||||
|
|
||||||
var max = instrument.RespectMidiLimits ?
|
var max = instrument.RespectMidiLimits ?
|
||||||
Math.Min(MaxMidiEventsPerBatch, MaxMidiEventsPerSecond - instrument.SentWithinASec)
|
Math.Min(MaxMidiEventsPerBatch, MaxMidiEventsPerSecond - instrument.SentWithinASec)
|
||||||
@@ -342,7 +342,7 @@ namespace Content.Client.Instruments
|
|||||||
if (max <= 0)
|
if (max <= 0)
|
||||||
{
|
{
|
||||||
// hit event/sec limit, have to lag the batch or drop events
|
// hit event/sec limit, have to lag the batch or drop events
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix cross-fade events generating retroactive events
|
// fix cross-fade events generating retroactive events
|
||||||
@@ -364,7 +364,7 @@ namespace Content.Client.Instruments
|
|||||||
var eventCount = events.Length;
|
var eventCount = events.Length;
|
||||||
|
|
||||||
if (eventCount == 0)
|
if (eventCount == 0)
|
||||||
return;
|
continue;
|
||||||
|
|
||||||
RaiseNetworkEvent(new InstrumentMidiEventEvent(instrument.OwnerUid, events));
|
RaiseNetworkEvent(new InstrumentMidiEventEvent(instrument.OwnerUid, events));
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
|
|||||||
|
|
||||||
instrument.Timer += frameTime;
|
instrument.Timer += frameTime;
|
||||||
if (instrument.Timer < 1)
|
if (instrument.Timer < 1)
|
||||||
return;
|
continue;
|
||||||
|
|
||||||
instrument.Timer = 0f;
|
instrument.Timer = 0f;
|
||||||
instrument.MidiEventCount = 0;
|
instrument.MidiEventCount = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user