Server queues entity position updates and delays sending them if there's not enough room in a message after writing the entity events and chat messages.

+ removed unused SparseUpdate
This commit is contained in:
Joonas Rikkonen
2017-06-28 23:05:41 +03:00
parent b904cb8e0e
commit 0998cdbe01
2 changed files with 88 additions and 65 deletions
+7
View File
@@ -59,6 +59,8 @@ namespace Barotrauma.Networking
//when was a specific entity event last sent to the client
// key = event id, value = NetTime.Now when sending
public Dictionary<UInt16, float> entityEventLastSent;
private Queue<Entity> pendingPositionUpdates = new Queue<Entity>();
public bool ReadyToStart;
@@ -70,6 +72,11 @@ namespace Barotrauma.Networking
public float deleteDisconnectedTimer;
public ClientPermissions Permissions = ClientPermissions.None;
public Queue<Entity> PendingPositionUpdates
{
get { return pendingPositionUpdates; }
}
public void InitClientSync()
{