Wire sections are updated after flipping, made the wire node list private and added public methods which ensure that sections are updated when modifying nodes
This commit is contained in:
@@ -251,8 +251,7 @@ namespace Barotrauma
|
||||
|
||||
var originalWire = ((Item)entitiesToClone[i]).GetComponent<Wire>();
|
||||
|
||||
cloneWire.Nodes = new List<Vector2>(originalWire.Nodes);
|
||||
cloneWire.UpdateSections();
|
||||
cloneWire.SetNodes(originalWire.GetNodes());
|
||||
|
||||
for (int n = 0; n < 2; n++)
|
||||
{
|
||||
|
||||
@@ -1080,7 +1080,10 @@ namespace Barotrauma
|
||||
if (item.Submarine != this) continue;
|
||||
|
||||
var wire = item.GetComponent<Items.Components.Wire>();
|
||||
if (wire != null) wire.MoveNodes(-center);
|
||||
if (wire != null)
|
||||
{
|
||||
wire.MoveNodes(-center);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < MapEntity.mapEntityList.Count; i++)
|
||||
|
||||
Reference in New Issue
Block a user