FAForever / faf-coop-maps

Coop maps for FAF
8 stars 21 forks source link

SC UEF Mission 3 Co-op bug #406

Closed maudlin27 closed 1 year ago

maudlin27 commented 1 year ago

UEF SC Mission 3 contains a flaw in the logic - it only moves on from objective 4 (kill or capture the Aeon princess) if units belonging to player 1 enter the area around the island. However, in a co-op game it is possible that it's player2+ who does this. The issue is that if they kill Eris before player 1 gets any units to approach the island, then the next objective bugs out because it tries creating a death callback on a unit that is already dead, meaning it's impossible to then complete the mission.

Relevant extracts from the E03_script file are noted below

function StartMission4()
    ScenarioFramework.CreateAreaTrigger(M4IslandApproach, ScenarioUtils.AreaToRect('Aeon_Island_Area'), categories.ALLUNITS, true, false, ArmyBrains[Player1], 1, false)

function M4IslandApproach()
    ScenarioFramework.Dialogue(OpStrings.E03_M04_020, AddObjectiveM4P2)
end

function AddObjectiveM4P2()
    ScenarioInfo.M4P1:ManualResult(true)
    ScenarioFramework.CreateUnitDeathTrigger(ErisKilled, ScenarioInfo.AeonCDR)