Wires can be dragged from a connection panel to the inventory without dropping them, wire connections & nodes are cleared when taking the wire outside

This commit is contained in:
Regalis
2016-11-02 14:40:05 +02:00
parent 19683e749d
commit 3cc807605e
2 changed files with 14 additions and 12 deletions
@@ -213,10 +213,11 @@ namespace Barotrauma.Items.Components
if (connections[0] != null && connections[0].Item.Submarine != null) sub = connections[0].Item.Submarine;
if (connections[1] != null && connections[1].Item.Submarine != null) sub = connections[1].Item.Submarine;
if (item.Submarine != null && item.Submarine != sub)
if (item.Submarine != sub)
{
ClearConnections();
Nodes.Clear();
return;
}
newNodePos = RoundNode(item.Position, item.CurrentHull) - sub.HiddenSubPosition;