diff options
author | rubidium <rubidium@openttd.org> | 2014-09-21 11:24:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-21 11:24:51 +0000 |
commit | 9daf7e749ccb00873443e2261379bf31999664d9 (patch) | |
tree | c6121f8173938736242b84b2830058d330f1da9a /src/saveload | |
parent | 982f5a6aa2f600106f9bd292ebefcef52e6e65e6 (diff) | |
download | openttd-9daf7e749ccb00873443e2261379bf31999664d9.tar.xz |
(svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 514f29465..cb3eae472 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -506,6 +506,18 @@ static uint FixVehicleInclination(Vehicle *v, Direction dir) } /** + * Checks for the possibility that a bridge may be on this tile + * These are in fact all the tile types on which a bridge can be found + * @param t The tile to analyze + * @return True if a bridge might have been present prior to savegame 194. + */ +static inline bool MayHaveBridgeAbove(TileIndex t) +{ + return IsTileType(t, MP_CLEAR) || IsTileType(t, MP_RAILWAY) || IsTileType(t, MP_ROAD) || + IsTileType(t, MP_WATER) || IsTileType(t, MP_TUNNELBRIDGE) || IsTileType(t, MP_OBJECT); +} + +/** * Perform a (large) amount of savegame conversion *magic* in order to * load older savegames and to fill the caches for various purposes. * @return True iff conversion went without a problem. |