Fix MP desync caused by incorrect FlowStat::ScaleToMonthly scaling

Fixes: 51a66b95
This commit is contained in:
Jonathan G Rennison
2023-07-10 20:21:27 +01:00
parent 3dd7d7318c
commit 8c430f6a12
2 changed files with 2 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ void FlowMapper::Run(LinkGraphJob &job) const
/* Scale by time the graph has been running without being compressed. Add 1 to avoid
* division by 0 if spawn date == last compression date. This matches
* LinkGraph::Monthly(). */
uint runtime = _scaled_date_ticks - job.LastCompression() + 1;
uint runtime = ClampTo<uint>(DateTicksToScaledDateTicks(job.StartDateTicks()) - job.LastCompression() + 1);
for (auto &it : flows) {
it.ScaleToMonthly(runtime);
}