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:
@@ -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. */
|
||||
|
||||
@@ -175,6 +175,7 @@ const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
|
||||
{ XSLFI_INDUSTRY_ANIM_MASK, XSCF_IGNORABLE_ALL, 1, 1, "industry_anim_mask", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_NEW_SIGNAL_STYLES, XSCF_NULL, 2, 2, "new_signal_styles", nullptr, nullptr, "XBST,NSID" },
|
||||
{ XSLFI_SCRIPT_INT64, XSCF_NULL, 1, 1, "script_int64", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_NO_TREE_COUNTER, XSCF_IGNORABLE_ALL, 1, 1, "no_tree_counter", nullptr, nullptr, nullptr },
|
||||
{ XSLFI_NULL, XSCF_NULL, 0, 0, nullptr, nullptr, nullptr, nullptr },// This is the end marker
|
||||
};
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ enum SlXvFeatureIndex {
|
||||
XSLFI_GRF_ROADSTOPS, ///< NewGRF road stops
|
||||
XSLFI_INDUSTRY_ANIM_MASK, ///< Industry tile animation masking
|
||||
XSLFI_NEW_SIGNAL_STYLES, ///< New signal styles
|
||||
XSLFI_NO_TREE_COUNTER, ///< No tree counter
|
||||
|
||||
XSLFI_SCRIPT_INT64, ///< See: SLV_SCRIPT_INT64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user