ID of the entity a character is interacting with is also sent to the client controlling the character (should fix characters dragging someone at the server's end but not at the client's, or vice versa)
This commit is contained in:
@@ -19,6 +19,8 @@ namespace Barotrauma
|
||||
public readonly float Timestamp;
|
||||
public readonly UInt16 ID;
|
||||
|
||||
public readonly Entity Interact; //the entity being interacted with
|
||||
|
||||
public PosInfo(Vector2 pos, Direction dir, float time)
|
||||
: this(pos, dir, 0, time)
|
||||
{
|
||||
@@ -30,11 +32,18 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
public PosInfo(Vector2 pos, Direction dir, UInt16 ID, float time)
|
||||
: this(pos, dir, ID, time, null)
|
||||
{
|
||||
}
|
||||
|
||||
public PosInfo(Vector2 pos, Direction dir, UInt16 ID, float time, Entity interact)
|
||||
{
|
||||
Position = pos;
|
||||
Direction = dir;
|
||||
this.ID = ID;
|
||||
|
||||
Interact = interact;
|
||||
|
||||
Timestamp = time;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user