Open JonnyOThan opened 3 months ago
Well, I mean technically a flag is a vessel, in the game's object hierarchy. I don't know (other than just hardcoding which class types to omit) what flag or criteria we could use to detect "this vessel isn't really a vessel. At least not that kind of vessel."
other than just hardcoding which class types to omit)
that’s probably where I’d start. There can be hundreds of asteroids, flags and debris in the universe and this can be a significant performance hit.
In fact..is the VesselModule only needed for loaded vessels? I’d assume it has some role to play in message handling but I didn’t see anything in a quick skim of the code.
The vessel class in KSP has a CurrentControlLevel
property, You could probably simply exclude any vessel where this is ControlLevel.NONE
to avoid hardcoding based on vessel types.
flags, asteroids, probably debris...
Also uses FixedUpdate, there might be a better option?