diff options
author | tron <tron@openttd.org> | 2007-01-31 10:50:12 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-31 10:50:12 +0000 |
commit | 63a5b0e8bea3a3d253b6d2dac88dd3e9cc84224c (patch) | |
tree | 9126411c97777bed62166bd5c07af56b5db913a0 /src/openttd.cpp | |
parent | f5d74b8af6abcbdc354acf19423296b1aac21d70 (diff) | |
download | openttd-63a5b0e8bea3a3d253b6d2dac88dd3e9cc84224c.tar.xz |
(svn r8485) -Fix
-Fix (since the dawn of time): Remove phantom oil rigs sometimes present in old savegames
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index a8fea2804..625a1b8f8 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1302,6 +1302,19 @@ bool AfterLoadGame(void) } break; + case STATION_OILRIG: { + /* Very old savegames sometimes have phantom oil rigs, i.e. + * an oil rig which got shut down, but not completly removed from + * the map + */ + TileIndex t1 = TILE_ADDXY(t, 1, 0); + if (!IsTileType(t1, MP_INDUSTRY) || + GetIndustryGfx(t1) != GFX_OILRIG_3) { + DeleteOilRig(t); + } + break; + } + default: break; } break; |