Misc changes from replay branch (#12581)

This commit is contained in:
Leon Friedrich
2022-11-15 19:34:47 +13:00
committed by GitHub
parent a2183fc223
commit 94011ca2b1
12 changed files with 21 additions and 12 deletions

View File

@@ -265,7 +265,7 @@ public sealed class InstrumentSystem : SharedInstrumentSystem
instrument.SequenceStartTick = midiEv.MidiEvent.Min(x => x.Tick) - 1;
}
var sqrtLag = MathF.Sqrt(_netManager.ServerChannel!.Ping / 1000f);
var sqrtLag = MathF.Sqrt((_netManager.ServerChannel?.Ping ?? 0)/ 1000f);
var delay = (uint) (renderer.SequencerTimeScale * (.2 + sqrtLag));
var delta = delay - instrument.SequenceStartTick;