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

Cybran M4 - fix bug where M2 can be completed before it has started #426

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

maudlin27
Copy link
Contributor

When testing to fix another (more common) issue I ran into the scenario where it tried completing mission 2 before it had started mission 2. This adds a redundancy to call the start of M2 first in this scenario, while also avoiding triggering the start of M2 multiple times as a result of the redundancy

ScenarioFramework.Dialogue(OpStrings.C04_M02_040)
else
Objectives.UpdateBasicObjective(ScenarioInfo.M2S1Objective, 'description', LOCF(OpStrings.M2S1Fail, 80))
if not(ScenarioInfo.M2P1Started == true) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you reverse this condition to

if ScenarioInfo.M2P1Started then
    return
end
ScenarioInfo.M2P1Started = true

to avoid unnecessary nesting

When testing to fix another (more common) issue I ran into the scenario where it tried completing mission 2 before it had started mission 2.  This adds a redundancy to call the start of M2 first in this scenario, while also avoiding triggering the start of M2 multiple times as a result of the redundancy
@maudlin27
Copy link
Contributor Author

Updated

@Garanas Garanas merged commit d409e13 into FAForever:master Mar 14, 2024
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.

3 participants