(svn r14700) -Fix (r1): loading of very old savegames was broken (STNS chunk is stored before MAP in old savegame)

This commit is contained in:
smatz
2008-12-20 01:35:12 +00:00
parent 383d8713cb
commit d1ea050232
3 changed files with 21 additions and 34 deletions

View File

@@ -3420,16 +3420,6 @@ static void Load_STNS()
Station *st = new (index) Station();
SaveLoad_STNS(st);
/* this means it's an oldstyle savegame without support for nonuniform stations */
if (st->train_tile != 0 && st->trainst_h == 0) {
uint w = GB(st->trainst_w, 4, 4);
uint h = GB(st->trainst_w, 0, 4);
if (GetRailStationAxis(st->train_tile) != AXIS_X) Swap(w, h);
st->trainst_w = w;
st->trainst_h = h;
}
}
/* This is to ensure all pointers are within the limits of _stations_size */