Open MiranDMC opened 5 days ago
my gut feeling is that this is going to blow up, hoping that I'm wrong
This reflects exactly how script queue looks on startup in CLEO4. Also this is done before any script is processed yet, so queue contains just main script. No mission or script thread had chance to be spawned yet.
Hm after more thinking I'm not sure how and when scripts attached to map objects are spawned (like vending machines). This still needs to be checked.
they load when the object is spawned on the map, object handle is passed to the new script
Ok in case of loading save game with original main scm it starts with multiple scripts already on list. Updated code to idea I had in first place, just append custom scripts queue at end of original queue.
Fix to keep scripts execution order same as in CLEO4. Changed due to fact the multiple scripts initialization behavior was fixed. Tested with few custom scripts, main, mission and thread from main running at once. Fixes #60