Server doesn't attempt to resend unacked EntityEvents until Connection.AverageRoundTripTime has passed

This commit is contained in:
Regalis
2016-11-13 14:45:00 +02:00
parent 498c72c64a
commit 724172fe7c
5 changed files with 47 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ namespace Barotrauma.Networking
{
abstract class NetEntityEventManager
{
const int MaxEventsPerWrite = 255;
const int MaxEventsPerWrite = 64;
public UInt32 LastReceivedEntityEventID
{
@@ -58,7 +58,7 @@ namespace Barotrauma.Networking
public void Read(NetIncomingMessage msg, float sendingTime)
{
UInt32 firstEventID = msg.ReadUInt32();
byte eventCount = msg.ReadByte();
int eventCount = msg.ReadByte();
for (int i = 0; i < eventCount; i++)
{
@@ -83,7 +83,7 @@ namespace Barotrauma.Networking
msg.ReadPadBits();
}
}
protected virtual void WriteEvent(NetBuffer buffer, NetEntityEvent entityEvent, Client recipient = null)
{
throw new NotImplementedException();