KSPModdingLibs/KSPCommunityFixes

Parachutes in symmetry keep their spread angle after decoupling

gotmachine opened this issue · 0 comments

See initial report on the forums

The ModuleParachute.symmetryCount field is keeping track of the symmetry group part count by updating it in a onVesselWasModified callback. Unfortunately, symmetry counterparts aren't updated yet when the event is called. Consequently, a chute that was in a symmetry group and then becomes "alone" following decoupling will retain the original symmetry count, resulting in the spread angle being applied and the chute drag being reduced.

Note that this is arguably a deeper KSP bug, as you would expect symmetry counterparts to be correctly updated on new Vessel instantiation following a decoupling, but fixing that globally is too likely to have side effects with foreign code relying on this stock behavior in a way or another. But for reference, the issue is in Part.decouple() calling CleanSymmetryVesselReferencesRecursively() after the decoupled Vessel has been initialized.

In our case, the issue can somewhat be worked around by using the onPartDeCoupleNewVesselComplete event.