protected virtual void updateAttachNodes(bool userInput) { currentNoseModule.updateAttachNodes(part, topNodeNames, userInput, ModelOrientation.TOP); currentMountModule.updateAttachNodes(part, bottomNodeNames, userInput, ModelOrientation.BOTTOM); AttachNode surface = part.srfAttachNode; if (surface != null) { Vector3 pos = currentMainTankModule.modelDefinition.surfaceNode.position * currentMainTankModule.currentDiameterScale; Vector3 rot = currentMainTankModule.modelDefinition.surfaceNode.orientation; SSTUAttachNodeUtils.updateAttachNodePosition(part, surface, pos, rot, userInput); } if (!String.IsNullOrEmpty(interstageNodeName)) { float y = currentMountModule.currentVerticalPosition + (currentMountModule.modelDefinition.fairingTopOffset * currentMountModule.currentHeightScale); Vector3 pos = new Vector3(0, y, 0); SSTUSelectableNodes.updateNodePosition(part, interstageNodeName, pos); AttachNode interstage = part.FindAttachNode(interstageNodeName); if (interstage != null) { Vector3 orientation = new Vector3(0, -1, 0); SSTUAttachNodeUtils.updateAttachNodePosition(part, interstage, pos, orientation, userInput); } } }
private void updateAttachNodes(bool userInput) { //if XX-dockModule!=empty, remove dock node name from NodeNames //I believe this is what is causing the duplicate attach nodes reported by someone on the forums topModule.updateAttachNodes(part, topNodeNames, userInput, ModelOrientation.TOP); bottomModule.updateAttachNodes(part, bottomNodeNames, userInput, ModelOrientation.BOTTOM); topDockModule.updateAttachNodes(part, new string[] { topDockNode }, userInput, ModelOrientation.TOP); bottomDockModule.updateAttachNodes(part, new string[] { bottomDockNode }, userInput, ModelOrientation.BOTTOM); }