-
Notifications
You must be signed in to change notification settings - Fork 178
Description
In certain gamestates, notably on mission end and possibly on mission start after a quick restart only, seems to contain data that's invalid / not yet cleaned up / already cleaned up, leading to states like wings containing ships with an objnum of -1.
This seems to be no issue with how the engine operates, and seems pretty much by design.
It is possible however to hook scripting to run at this time. Base scripting will not operate on the resulting invalid handles, but calling evaluateSEXP with the respective shipnames will cause the custom SEXP system to try to create shiphandles for the invalid ship, causing a CTD.
There's a few approaches here.
For one, the LuaSEXP system should just not CTD if it gets called on an invalid ship.
Additionally, we should evaluate why there are invalid ships in wings on mission end, and if that makes sense at all.
Finally, the viability of evaluateSEXP being available at all after and before mission is questionable.