Skip to content

Commit

Permalink
reduced node attachment checks
Browse files Browse the repository at this point in the history
  • Loading branch information
my-th-os committed May 9, 2019
1 parent 6debcaa commit 66c1d14
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions KML/KML/KmlPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,8 @@ public static List<KmlPart> BuildAttachmentStructure(List<KmlPart> parts)
// Usually you can only attach a new part by a node to the surface of parent
// and not attach a part by surface to parents node. But if you have vessels docked
// this situation may happen and this leads to this additional check
else if (part.ParentPart.AttachedToSurfaceIndex != i)
else if (part.ParentPart.AttachedToSurfaceIndex != i && !part.ParentPart.AttachedToNodeIndices.Contains(i))
{
//if (part.ParentPart.AttachedToNodeIndices.Contains(i))
// Syntax.Warning(part, "gotcha");
Syntax.Warning(part, "Part not attached to parent part: " + part.ParentPart);
}
}
Expand Down Expand Up @@ -999,7 +997,7 @@ public static List<KmlPart> BuildAttachmentStructure(List<KmlPart> parts)
KmlPartDock.BuildDockStructure(grapple, other);
}
}
else
else if (!part.AttachedToNodeIndices.Contains(parts.IndexOf(other)))
{
Syntax.Warning(part, "Part node attachment not responded from other part: " + other.ToString());
}
Expand Down

0 comments on commit 66c1d14

Please sign in to comment.