diff options
author | peter1138 <peter1138@openttd.org> | 2005-11-09 09:16:08 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2005-11-09 09:16:08 +0000 |
commit | 7d888a57156de9341d19154abc5bcdafadc4aa28 (patch) | |
tree | 391936ddebd5bff8271d6079e676e8c8a41515db | |
parent | 350f0f2cdb66364ca1b6116b77ef249b54f58421 (diff) | |
download | openttd-7d888a57156de9341d19154abc5bcdafadc4aa28.tar.xz |
(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)
-rw-r--r-- | openttd.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1277,6 +1277,9 @@ bool AfterLoadGame(uint version) 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); } |