File diff r21732:a9c964208420 → r21733:9e3a5387d8a6
src/saveload/afterload.cpp
Show inline comments
 
@@ -573,12 +573,18 @@ bool AfterLoadGame()
 
	if (IsSavegameVersionBefore(194)) {
 
		/* In old savegame versions, the heightlevel was coded in bits 0..3 of the type field */
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			_m[t].height = GB(_m[t].type, 0, 4);
 
			SB(_m[t].type, 0, 2, GB(_m[t].m6, 0, 2));
 
			SB(_m[t].m6, 0, 2, 0);
 
			if (MayHaveBridgeAbove(t)) {
 
				SB(_m[t].type, 2, 2, GB(_m[t].m6, 6, 2));
 
				SB(_m[t].m6, 6, 2, 0);
 
			} else {
 
				SB(_m[t].type, 2, 2, 0);
 
			}
 
		}
 
	}
 

	
 
	/* in version 2.1 of the savegame, town owner was unified. */
 
	if (IsSavegameVersionBefore(2, 1)) ConvertTownOwner();