Skip to content

Commit

Permalink
fix FleetBuilder FlightTime with tx
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Sep 15, 2022
1 parent 7b3f580 commit 5537c50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/wrapper/fleetBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ func (f *FleetBuilder) FlightTime() (secs, fuel int64) {
ships, _ = f.b.GetShips(f.origin.GetID())
}
}
if f.tx != nil {
return f.tx.FlightTime(f.origin.GetCoordinate(), f.destination, f.speed, ships, f.mission)
}
return f.b.FlightTime(f.origin.GetCoordinate(), f.destination, f.speed, ships, f.mission)
}

Expand Down

0 comments on commit 5537c50

Please sign in to comment.