Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run postInit when CBA_SettingsInitialized has been triggered #164

Merged
merged 1 commit into from
Jul 25, 2022
Merged

Run postInit when CBA_SettingsInitialized has been triggered #164

merged 1 commit into from
Jul 25, 2022

Conversation

ColinM9991
Copy link
Contributor

@ColinM9991 ColinM9991 commented Jul 25, 2022

Prevents race conditions whereby the grad_civs_main_enabled flag could be initialized after the scripts are executed.

Tested:

  • Locally to ensure addons are still invoked
  • Dedicated server with headless client

Dedicated server test scenarios:

  1. Starting Headless Client 5 minutes after server start.
  2. Starting headless client with dedicated server, prior to mission start

In both scenarios, where the dedicated server and headless client both owned the civilian objects, civilians did spawn successfully and there were no issues with evaluating the value of grad_civs_main_enabled.

I haven't tested bug #125 but this change may also resolve that problem.

@Fusselwurm Fusselwurm self-requested a review July 25, 2022 16:49
Init code, when it depends on CBA settings, now executes when the CBA_SettingsInitialized event is triggered.
@Fusselwurm Fusselwurm merged commit c80c9a7 into gruppe-adler:main Jul 25, 2022
@ColinM9991 ColinM9991 deleted the delayed-init branch July 25, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants