Changeset - r23501:884a011c636c
[Not reviewed]
master
0 2 0
Peter Nelson - 5 years ago 2019-03-24 14:54:13
peter1138@openttd.org
Change: Bump savegame version for tree tile water class conversion.
2 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/afterload.cpp
Show inline comments
 
@@ -3111,8 +3111,8 @@ bool AfterLoadGame()
 
		FOR_ALL_INDUSTRIES(ind) if (ind->neutral_station != NULL) ind->neutral_station->industry = ind;
 
	}
 

	
 
	{
 
		/* Update water class for trees for all current savegame versions. */
 
	if (IsSavegameVersionBefore(SLV_TREES_WATER_CLASS)) {
 
		/* Update water class for trees. */
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			if (IsTileType(t, MP_TREES)) SetWaterClass(t, GetTreeGround(t) == TREE_GROUND_SHORE ? WATER_CLASS_SEA : WATER_CLASS_INVALID);
 
		}
src/saveload/saveload.h
Show inline comments
 
@@ -297,6 +297,7 @@ enum SaveLoadVersion : uint16 {
 
	SLV_SERVE_NEUTRAL_INDUSTRIES,           ///< 210  PR#7234 Company stations can serve industries with attached neutral stations.
 
	SLV_ROADVEH_PATH_CACHE,                 ///< 211  PR#7261 Add path cache for road vehicles.
 
	SLV_REMOVE_OPF,                         ///< 212  PR#7245 Remove OPF.
 
	SLV_TREES_WATER_CLASS,                  ///< 213  PR#7405 WaterClass update for tree tiles.
 

	
 
	SL_MAX_VERSION,                         ///< Highest possible saveload version
 
};
0 comments (0 inline, 0 general)