Changeset - r2620:7b1966fd180d
[Not reviewed]
master
0 1 0
peter1138 - 19 years ago 2005-11-09 09:16:08
peter1138@openttd.org
(svn r3158) - PBS: [ 1252192 ] Fix an assertion failure due to possible junk data in pre-PBS savegames. This will not correct pre-PBS savegames loaded and saved since PBS was introduced. (thanks glx)
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
openttd.c
Show inline comments
 
@@ -1274,12 +1274,15 @@ bool AfterLoadGame(uint version)
 
	if (version < 0xF00) {
 
		BEGIN_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0) {
 
			if (IsTileType(tile, MP_RAILWAY) && HasSignals(tile) && HASBIT(_m[tile].m4, 2)) {
 
				CLRBIT(_m[tile].m4, 2);
 
				SETBIT(_m[tile].m4, 3);
 
			}
 
			// Clear possible junk data in PBS bits.
 
			if (IsTileType(tile, MP_RAILWAY) && !HASBIT(_m[tile].m5, 7))
 
				SB(_m[tile].m4, 4, 4, 0);
 
		} END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
 
	}
 

	
 
	if (version < 0x1000) {
 
		int i;
 
		FOR_ALL_PLAYERS(p) {
0 comments (0 inline, 0 general)