Do you mean there is a flag that can be used to delete immediately? Or that I should flag somehow a vessel as deleted? I set a very low empty mass to mark deleted vessels.
Do you mean there is a flag that can be used to delete immediately? Or that I should flag somehow a vessel as deleted? I set a very low empty mass to mark deleted vessels.
Yes, a parameter to the delete function, that was introduced to prevent crashes of Orbiter if you self-deleted your vessel not as last action of the time step.
Vessels should never be deleted directly, but only through the oapiDeleteVessel function. This function doesn't itself delete the vessel, but sets a flag. At the end of each time frame, any pending deletion requests are processed. Deleting the vessel at the end of the time step serves two purposes:
the behaviour doesn't depend on the order in which vessels are processed
vessels can destroy themselves
Deleting a vessel is actually quite a protracted affair, because before the actual deletion, all the active modules and the renderer are notified (via the Module::clbkVesselDelete, or opcDelVessel callbacks) so they can clean up any handles they may be holding before they become invalid. If the vessel is part of a superstructure, all attached or docked vessels are released. Finally, new a new focus vessel and camera target is selected if required.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.