diff --git a/Assets/Mirror/Core/Batching/Unbatcher.cs b/Assets/Mirror/Core/Batching/Unbatcher.cs index d5b411fa3..5a12a8916 100644 --- a/Assets/Mirror/Core/Batching/Unbatcher.cs +++ b/Assets/Mirror/Core/Batching/Unbatcher.cs @@ -90,22 +90,17 @@ public bool GetNextMessage(out NetworkReader message, out double remoteTimeStamp // ProcessMessage(message); // message = null; + remoteTimeStamp = 0; // do nothing if we don't have any batches. // otherwise the below queue.Dequeue() would throw an // InvalidOperationException if operating on empty queue. if (batches.Count == 0) - { - remoteTimeStamp = 0; return false; - } // was our reader pointed to anything yet? if (reader.Capacity == 0) - { - remoteTimeStamp = 0; return false; - } // no more data to read? if (reader.Remaining == 0) @@ -123,11 +118,7 @@ public bool GetNextMessage(out NetworkReader message, out double remoteTimeStamp StartReadingBatch(next); } // otherwise there's nothing more to read - else - { - remoteTimeStamp = 0; - return false; - } + else return false; } // use the current batch's remote timestamp