Syncing crouching from server to clients, not just from clients to server

This commit is contained in:
Joonas Rikkonen
2017-07-28 18:59:47 +03:00
parent 719f19418c
commit 9e3f4bfa5a
2 changed files with 11 additions and 0 deletions
@@ -86,6 +86,13 @@ namespace Barotrauma
keys[(int)InputType.Use].Held = useInput;
keys[(int)InputType.Use].SetState(false, useInput);
if (AnimController is HumanoidAnimController)
{
bool crouching = msg.ReadBoolean();
keys[(int)InputType.Crouch].Held = crouching;
keys[(int)InputType.Crouch].SetState(false, crouching);
}
bool hasAttackLimb = msg.ReadBoolean();
if (hasAttackLimb)
{