Clear old tree counter in map array on load of old savegames

See: https://github.com/OpenTTD/OpenTTD/pull/10018
This commit is contained in:
Jonathan G Rennison
2022-10-01 23:04:49 +01:00
parent 30bc490292
commit 12eb23f0ab
5 changed files with 23 additions and 1 deletions

View File

@@ -4098,6 +4098,14 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_NO_TREE_COUNTER)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_TREES)) {
ClearOldTreeCounter(t);
}
}
}
InitializeRoadGUI();
/* This needs to be done after conversion. */