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

@@ -215,6 +215,18 @@ static inline void SetTreeGrowth(TileIndex t, uint g)
SB(_m[t].m5, 0, 3, g);
}
/**
* Clear the old tick counter for a tree-tile
*
* @param t The tile to clear the old tick counter
* @pre Tile must be of type MP_TREES
*/
static inline void ClearOldTreeCounter(TileIndex t)
{
assert_tile(IsTileType(t, MP_TREES), t);
SB(_m[t].m2, 0, 4, 0);
}
/**
* Make a tree-tile.
*