InGame update messages include a timestamp which is passed to the ClientRead methods

Now only used in character position syncing, but some other entities may also have an use for it (e.g. discarding outdated data)
This commit is contained in:
Regalis
2016-10-18 19:04:32 +03:00
parent b68eeda8a8
commit 9fed308705
17 changed files with 27 additions and 32 deletions

View File

@@ -625,6 +625,8 @@ namespace Barotrauma.Networking
{
NetOutgoingMessage outmsg = server.CreateMessage();
outmsg.Write((byte)ServerPacketHeader.UPDATE_INGAME);
outmsg.Write((float)NetTime.Now);
outmsg.Write((byte)ServerNetObject.SYNC_IDS);
outmsg.Write(c.lastSentChatMsgID); //send this to client so they know which chat messages weren't received by the server