mirror of https://github.com/OpenTTD/OpenTTD
(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)
parent
350f0f2cdb
commit
7d888a5715
|
@ -1277,6 +1277,9 @@ bool AfterLoadGame(uint version)
|
||||||
CLRBIT(_m[tile].m4, 2);
|
CLRBIT(_m[tile].m4, 2);
|
||||||
SETBIT(_m[tile].m4, 3);
|
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);
|
} END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue