Open IceRaptor opened 3 years ago
From #ticket-4729 on RT server:
Weird It seems like Round 1 started ... 4 times? 2021-04-08T09:59:11 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]]
2021-04-08T09:59:12 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]]
2021-04-08T09:59:12 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]]
2021-04-08T09:59:20 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]] No, at least 5 times 2021-04-08T09:58:53 EncounterLogic.Dialogue [LOG] PlayNextMessage: message count 0 2021-04-08T09:58:53 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]] WTF My guess is that this is ultimately getting called from all the dropships deploying extra units Since there's a path through TurnDirector.OnDropshipAnimationComplete to TurnDirector.CheckGameBegin which calls StartFirstRound() Which happens to be in the log after the first turn for the Hitman 2021-04-08T09:59:13 CombatLog.RoundSequence [LOG] Team TargetTeam becoming active 2021-04-08T09:59:13 MissionControl [DEBUG] [AI] [Round '1' Phase '9' Unit Action '1'] ['TargetTeam' unit 'Hitman HM-1r' AI type 'CoreAITree'] Log Node 2021-04-08T09:59:13 MissionControl [DEBUG] [AI] [HasFollowLanceTargetNode] False ... 2021-04-08T09:59:20 CombatLog.RoundSequence [LOG] TurnDirector.OnDropshipAnimationComplete 2021-04-08T09:59:20 CombatLog.RoundSequence [LOG] [[[============== Round 1 Begin! ================]]] My guess is that this is a MissionControl bug Since I think that's what spawns the extra lances?
There appears to be a bug with the MissionControl (maybe?) implementation of additional lances. When the dropship lands, it looks like it invokes TurnDirector.OnDropshipAnimationComplete which ultimately ends up calling TurnDirector.StartFirstRound. This can lead to the round 'starting' multiple times.
We need to put a gate in on TurnDirector.StartFirstRound() to do nothing is GameHasBegun = true. Fix should be named something like 'PreventMultipleFirstRoundStarts'?