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
+1 -1
View File
@@ -1079,7 +1079,7 @@ namespace Barotrauma
msg.Write(Velocity.Y);
}
public void ClientRead(NetIncomingMessage msg)
public void ClientRead(NetIncomingMessage msg, float sendingTime)
{
subBody.TargetPosition = new Vector2(msg.ReadSingle(), msg.ReadSingle());
subBody.Velocity = new Vector2(msg.ReadSingle(), msg.ReadSingle());