Reliablesender exception handling, buttons crashing multiplayer, using screwdrivers/wrenches with left click, RestoreCollision exception handling, nerfed c4, UpdateLimbCollisionCategories fix

This commit is contained in:
Regalis
2015-10-23 00:10:27 +03:00
parent 51e68f0949
commit b3462b24b4
34 changed files with 256 additions and 113 deletions
@@ -420,11 +420,17 @@ namespace Barotrauma.Items.Components
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetIncomingMessage message)
{
Nodes.Clear();
List<Vector2> newNodes = new List<Vector2>();
int nodeCount = message.ReadByte();
for (int i = 0; i<nodeCount; i++)
{
Nodes.Add(new Vector2(message.ReadFloat(), message.ReadFloat()));
Vector2 newNode = new Vector2(message.ReadFloat(), message.ReadFloat());
if (!MathUtils.IsValid(newNode)) return;
newNodes.Add(newNode);
}
Nodes = newNodes;
}
}
}