Since a few months now NASSP has variable CG in the CSM+LM accomplished with ShiftCG(). We are now noticing issues with VC click-spot positions getting messed up only scenarios with both LM + CSM loaded in the session and only when the session is loaded already in the VC. The issue seems to be each vessel's ShiftCG call affecting the other vessel's VC click-spots.
In ShiftCG() as we can see here: https://github.com/orbitersim/orbit...c24e7124e051bfd0/Src/Orbiter/Vessel.cpp#L7631 it calls ShiftVC() which itself does things such as shift the VC click-spots. It seems to me that the issue might be ShiftCG() is shifting the click-spots of ALL the vessels in the session, and not just the intended one (the one where the ShiftCG() is called).
I made some tests outside of NASSP, using just stock orbiter vessels and this seems to have the issue as well... if you call a ShiftCG() from one vessel, it will change/corrupt the click-spots of every other vessel too in the session. Its hard to notice it because if you're in the vessel that calls the ShiftCG() obviously the click-spot shift is wanted and everything looks normal, but if you then switch to the other vessel, clbkLoadVC() will be called and it will correct the click-spots before you notice. But then from there quit/reload from the VC and your click-spots are messed up because your vessel does clbkLoadVC() before the other vessel does the ShiftCG().
Here is the issue: https://github.com/orbiternassp/NASSP/issues/671
I have looked through the Orbiter source code to see any potential clues but no luck so far, any ideas?
In ShiftCG() as we can see here: https://github.com/orbitersim/orbit...c24e7124e051bfd0/Src/Orbiter/Vessel.cpp#L7631 it calls ShiftVC() which itself does things such as shift the VC click-spots. It seems to me that the issue might be ShiftCG() is shifting the click-spots of ALL the vessels in the session, and not just the intended one (the one where the ShiftCG() is called).
I made some tests outside of NASSP, using just stock orbiter vessels and this seems to have the issue as well... if you call a ShiftCG() from one vessel, it will change/corrupt the click-spots of every other vessel too in the session. Its hard to notice it because if you're in the vessel that calls the ShiftCG() obviously the click-spot shift is wanted and everything looks normal, but if you then switch to the other vessel, clbkLoadVC() will be called and it will correct the click-spots before you notice. But then from there quit/reload from the VC and your click-spots are messed up because your vessel does clbkLoadVC() before the other vessel does the ShiftCG().
Here is the issue: https://github.com/orbiternassp/NASSP/issues/671
I have looked through the Orbiter source code to see any potential clues but no luck so far, any ideas?
Last edited: