Increased minimum midround sync timeout to 10 s, an extra check to make sure the server doesn't write position updates during midround syncing (because the entities may not exist client-side yet)
This commit is contained in:
@@ -963,8 +963,9 @@ namespace Barotrauma.Networking
|
||||
|
||||
WriteChatMessages(outmsg, c);
|
||||
|
||||
//write as many position updates as the message can fit
|
||||
while (outmsg.LengthBytes < config.MaximumTransmissionUnit - 20 &&
|
||||
//write as many position updates as the message can fit (only after midround syncing is done)
|
||||
while (!c.NeedsMidRoundSync &&
|
||||
outmsg.LengthBytes < config.MaximumTransmissionUnit - 20 &&
|
||||
c.PendingPositionUpdates.Count > 0)
|
||||
{
|
||||
var entity = c.PendingPositionUpdates.Dequeue();
|
||||
|
||||
Reference in New Issue
Block a user