Fixes to unconscious character pos syncing:

- main limb is anchored to collider
- server ignores inputs from unconscious characters and doesn't freeze them
- using timestamp-based interpolation on the client's own character instead of IDs
This commit is contained in:
Regalis
2017-01-03 23:49:37 +02:00
parent 1eea373117
commit bb685019a2
5 changed files with 81 additions and 58 deletions
+7 -6
View File
@@ -20,21 +20,22 @@ namespace Barotrauma
public readonly UInt32 ID;
public PosInfo(Vector2 pos, Direction dir, float time)
: this(pos, dir, 0, time)
{
Position = pos;
Direction = dir;
Timestamp = time;
ID = 0;
}
public PosInfo(Vector2 pos, Direction dir, UInt32 ID)
: this(pos, dir, ID, 0.0f)
{
}
public PosInfo(Vector2 pos, Direction dir, UInt32 ID, float time)
{
Position = pos;
Direction = dir;
this.ID = ID;
Timestamp = 0.0f;
Timestamp = time;
}
}