This commit is contained in:
MrGadget 2024-01-17 04:38:24 -05:00
parent 035afd140e
commit 60a186c5f2

View File

@ -291,10 +291,11 @@ internal struct ReusableNetworkId
internal static uint GetNextNetworkId()
{
// Older Unity versions don't have TryPeek.
if (reuseNetworkIds && netIdQueue.Count > 0 && netIdQueue.Peek().timeAvailable < NetworkTime.time)
{
ReusableNetworkId entry = netIdQueue.Dequeue();
//Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, $"[GetNextNetworkId] Reusing NetworkId {entry.poolNetId}.");
//Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, $"[GetNextNetworkId] Reusing NetworkId {entry.reusableNetId}.");
return entry.reusableNetId;
}