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:
Regalis
2016-11-16 18:32:18 +02:00
parent 3bd635e3d4
commit d37bad2d44
4 changed files with 67 additions and 56 deletions

View File

@@ -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++)
{