ArcanePariah / Night-of-the-Dead

9 stars 14 forks source link

Changing how chem leak optional mission operates, no change to mission itself. #262

Closed NiktosNOTD closed 5 years ago

NiktosNOTD commented 5 years ago

WHY: why EC_Leaks_did_not_start.zip

What the issue was about: 1.Chem leaks tested for start on only 2 of 3 hexes that the mission uses 2.Chem leaks tests for start every 2 seconds, so players walking on and off can miss that window of time 3.It requires team average position to be 10 distance away from scrapyard center.

For the replay it was mix of reasons 2+3

What i did: 1.Now it tests for all 3 mission hexes (requiring any 2 to start) 2.Now it tests after any change of marine pressence on hex (going off and on hexes) 3.Raised the required distance to 25

How i did it: -split 'OM4ScrapyardSalvageInit' into two triggers, creating 'OM4ScrapyardSalvageStart'. -'OM4ScrapyardSalvageInit' handles starting of mission objective, visual indications of it being available -new 'OM4ScrapyardSalvageStart' - Tests if players meet conditions to start, and handles spawning of mobs in leaks wave -Changed how game recognizes that players want to start leaks, previously it waited for meeting conditions in infinite loop with hardcoded tests for all player marines now 'OM4ScrapyardSalvageStart' has dynamically register events within 'RegisterMarineWithEvents' functions like other optional missions. On event firing it checks hexes and if 2 or more are occupied starts the mission.