EntityEventManagers wait for 1.5*roundtriptime before resending messages (less unnecessary resends), skipping to the next event in a packet if an exception is thrown while reading an event
This commit is contained in:
@@ -59,7 +59,8 @@ namespace Barotrauma.Networking
|
||||
float lastSent = 0;
|
||||
eventLastSent.TryGetValue(events[i].ID, out lastSent);
|
||||
|
||||
if (lastSent > NetTime.Now - serverConnection.AverageRoundtripTime)
|
||||
//wait for 1.5f * roundtriptime until resending
|
||||
if (lastSent > NetTime.Now - serverConnection.AverageRoundtripTime * 1.5f)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user