Skip to content

Commit

Permalink
Increase max frame limit to consider Alliance commands for UMS AI tea…
Browse files Browse the repository at this point in the history
…m detection
  • Loading branch information
icza committed Mar 7, 2023
1 parent 52c3ef9 commit 532b9c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rep/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ func (r *Replay) computeUMSTeamsAI() {
}
}

// Stop after ~90 seconds: use the "initial" teams
frameMaxLimit := repcore.Duration2Frame(90 * time.Second)
// Stop after ~115 seconds: use the "initial" teams
frameMaxLimit := repcore.Duration2Frame(115 * time.Second)
frameMinLimit := repcore.Duration2Frame(18 * time.Second)
for _, cmd := range r.Commands.Cmds {
if cmd.BaseCmd().Frame > frameMaxLimit {
Expand All @@ -345,7 +345,7 @@ func (r *Replay) computeUMSTeamsAI() {
if p := r.Header.PIDPlayers[ac.PlayerID]; p != nil && p.Observer {
continue
}
filteredSlotIDs := filterOutObserverSlotIDs(ac.SlotIDs) // Note: first filter as on "BGH Random Teams" this also includes the obs computer!
filteredSlotIDs := filterOutObserverSlotIDs(ac.SlotIDs) // Note: first filter because on "BGH Random Teams" this also includes the obs computer!
if len(filteredSlotIDs) == 1 && cmd.BaseCmd().Frame < frameMinLimit {
continue // Random team arrangement has likely not done, do not count!
}
Expand Down

0 comments on commit 532b9c8

Please sign in to comment.