From 7d888a57156de9341d19154abc5bcdafadc4aa28 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 9 Nov 2005 09:16:08 +0000 Subject: (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) --- openttd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openttd.c b/openttd.c index 1229b24f9..c591e259e 100644 --- a/openttd.c +++ b/openttd.c @@ -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); } -- cgit v1.2.3-70-g09d2