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:
@@ -833,7 +833,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public void ClientRead(NetIncomingMessage msg)
|
||||
public void ClientRead(NetIncomingMessage msg, float sendingTime)
|
||||
{
|
||||
for (int i = 0; i < sections.Count(); i++)
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user