Fix a bunch of returns where they should not be (#5640)

This commit is contained in:
20kdc
2021-12-01 14:00:10 +00:00
committed by GitHub
parent 53c0a47e39
commit b5c5871453
2 changed files with 5 additions and 5 deletions

View File

@@ -322,7 +322,7 @@ namespace Content.Client.Instruments
UpdateRenderer(instrument.OwnerUid, instrument);
if (!instrument.IsMidiOpen && !instrument.IsInputOpen)
return;
continue;
var now = _gameTiming.RealTime;
var oneSecAGo = now.Add(OneSecAgo);
@@ -333,7 +333,7 @@ namespace Content.Client.Instruments
instrument.SentWithinASec = 0;
}
if (instrument.MidiEventBuffer.Count == 0) return;
if (instrument.MidiEventBuffer.Count == 0) continue;
var max = instrument.RespectMidiLimits ?
Math.Min(MaxMidiEventsPerBatch, MaxMidiEventsPerSecond - instrument.SentWithinASec)
@@ -342,7 +342,7 @@ namespace Content.Client.Instruments
if (max <= 0)
{
// hit event/sec limit, have to lag the batch or drop events
return;
continue;
}
// fix cross-fade events generating retroactive events
@@ -364,7 +364,7 @@ namespace Content.Client.Instruments
var eventCount = events.Length;
if (eventCount == 0)
return;
continue;
RaiseNetworkEvent(new InstrumentMidiEventEvent(instrument.OwnerUid, events));

View File

@@ -166,7 +166,7 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
instrument.Timer += frameTime;
if (instrument.Timer < 1)
return;
continue;
instrument.Timer = 0f;
instrument.MidiEventCount = 0;