diff options
author | tron <tron@openttd.org> | 2007-01-31 21:38:09 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-31 21:38:09 +0000 |
commit | ce12ae7420515cc9cad636dadb500a1f32776b04 (patch) | |
tree | 997658e9f03cf77d860600dbff7e8976f949f773 /src/openttd.cpp | |
parent | c5c0a54a5020e911f0375db8dfbf228032a5773a (diff) | |
download | openttd-ce12ae7420515cc9cad636dadb500a1f32776b04.tar.xz |
(svn r8498) -Fix
-Codechange: Move the update of the oil rig airport type to the recently (r8485) added loop
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index ffbb59e2d..9377483e1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1154,7 +1154,6 @@ static void UpdateSignOwner(void) } extern void UpdateOldAircraft( void ); -extern void UpdateOilRig( void ); static inline RailType UpdateRailType(RailType rt, RailType min) @@ -1278,9 +1277,6 @@ bool AfterLoadGame(void) DoZoomInOutWindow(ZOOM_NONE, w); // update button status MarkWholeScreenDirty(); - // In 5.1, Oilrigs have been moved (again) - if (CheckSavegameVersionOldStyle(5, 1)) UpdateOilRig(); - /* From this version on there can be multiple road stops of the same type per * station. Convert the existing stops to the new internal data structure. */ @@ -1307,8 +1303,14 @@ bool AfterLoadGame(void) * the map */ TileIndex t1 = TILE_ADDXY(t, 1, 0); - if (!IsTileType(t1, MP_INDUSTRY) || - GetIndustryGfx(t1) != GFX_OILRIG_3) { + if (IsTileType(t1, MP_INDUSTRY) && + GetIndustryGfx(t1) == GFX_OILRIG_3) { + /* The internal encoding of oil rigs was changed twice. + * It was 3 (till 2.2) and later 5 (till 5.1). + * Setting it unconditionally does not hurt. + */ + GetStationByTile(t)->airport_type = AT_OILRIG; + } else { DeleteOilRig(t); } break; |