diff --git a/Barotrauma/BarotraumaClient/Source/Characters/CharacterNetworking.cs b/Barotrauma/BarotraumaClient/Source/Characters/CharacterNetworking.cs index 97bbaa253..7fe1028ac 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/CharacterNetworking.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/CharacterNetworking.cs @@ -29,7 +29,7 @@ namespace Barotrauma break; case NetEntityEvent.Type.Control: msg.WriteRangedInteger(0, 3, 3); - msg.Write((UInt16)AnimController.GrabLimb); + msg.Write((byte)AnimController.GrabLimb); break; } } @@ -95,7 +95,7 @@ namespace Barotrauma bool crouching = msg.ReadBoolean(); keys[(int)InputType.Crouch].Held = crouching; keys[(int)InputType.Crouch].SetState(false, crouching); - AnimController.GrabLimb = (LimbType)msg.ReadUInt16(); + AnimController.GrabLimb = (LimbType)msg.ReadByte(); } bool hasAttackLimb = msg.ReadBoolean(); diff --git a/Barotrauma/BarotraumaShared/Source/Characters/CharacterNetworking.cs b/Barotrauma/BarotraumaShared/Source/Characters/CharacterNetworking.cs index 3b923cb09..81a5d9e98 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/CharacterNetworking.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/CharacterNetworking.cs @@ -358,7 +358,7 @@ namespace Barotrauma } break; case 3: - LimbType grabLimb = (LimbType)msg.ReadUInt16(); + LimbType grabLimb = (LimbType)msg.ReadByte(); if (c.Character != this) { #if DEBUG @@ -449,7 +449,7 @@ namespace Barotrauma if (AnimController is HumanoidAnimController) { tempBuffer.Write(((HumanoidAnimController)AnimController).Crouching); - tempBuffer.Write((UInt16)AnimController.GrabLimb); + tempBuffer.Write((byte)AnimController.GrabLimb); } bool hasAttackLimb = AnimController.Limbs.Any(l => l != null && l.attack != null);