KSPModdingLibs / KSPCommunityFixes

Community patches for bugs in the KSP codebase
49 stars 17 forks source link

Fix #195: clone the srfAttachNode when reversing a surface attachment during re-root #198

Closed JonnyOThan closed 6 months ago

JonnyOThan commented 6 months ago

A different take on ReRootPreserveSurfaceAttach. Slightly closer to the apparent intended behavior from stock.

JonnyOThan commented 6 months ago

hrm there seems to be some extra changes in here that shouldn't be :/ let me see if I can clean that up

gotmachine commented 6 months ago

Well, as I mentioned in the related issue, my opinion is that this is way too hacky and is very likely to cause weird side effect for any piece of code expecting a surface attached part to be attached by the surface attach node.

Doing a quick GH search, I find way too many pieces of code doing checks of the part.srfAttachNode.attachedPart == something style for this patch to have no side effect. This even happen in some stock code.