mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix bad stagger interval calculation.
Was using the interval from mission start to latest rather than from earliest to latest, so this could sometimes be off by a bit and cause us to not generate enough start times.
This commit is contained in:
parent
e8feded4c3
commit
11604671f8
@ -490,7 +490,7 @@ class CoalitionMissionPlanner:
|
||||
def stagger_missions(self) -> None:
|
||||
def start_time_generator(count: int, earliest: int, latest: int,
|
||||
margin: int) -> Iterator[timedelta]:
|
||||
interval = latest // count
|
||||
interval = (latest - earliest) // count
|
||||
for time in range(earliest, latest, interval):
|
||||
error = random.randint(-margin, margin)
|
||||
yield timedelta(minutes=max(0, time + error))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user