Fix changing town zone settings not updating town zone radii

This could cause MP desyncs
This commit is contained in:
Jonathan G Rennison
2022-11-01 18:17:27 +00:00
parent 95a646d09b
commit 94de25ec10
4 changed files with 32 additions and 7 deletions

View File

@@ -2081,6 +2081,13 @@ void UpdateTownRadius(Town *t)
}
}
void UpdateTownRadii()
{
for (Town *town : Town::Iterate()) {
UpdateTownRadius(town);
}
}
void UpdateTownMaxPass(Town *t)
{
t->supplied[CT_PASSENGERS].old_max = t->cache.population >> 3;