diff options
author | rubidium <rubidium@openttd.org> | 2007-10-20 16:50:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-20 16:50:48 +0000 |
commit | 5289aa2010b5fb249ba316f6e4b67ad5f7159120 (patch) | |
tree | 30e50cebc542be694f72726e770ef47ea943f6d0 /src/bridge_map.cpp | |
parent | 8212088c03c0a0af451f734391699e5dab8d8608 (diff) | |
download | openttd-5289aa2010b5fb249ba316f6e4b67ad5f7159120.tar.xz |
(svn r11313) -Codechange: prepare several pieces of code so the can handle some new slopes. Patch by frosch.
Diffstat (limited to 'src/bridge_map.cpp')
-rw-r--r-- | src/bridge_map.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bridge_map.cpp b/src/bridge_map.cpp index 12a4bd6d4..318249a4f 100644 --- a/src/bridge_map.cpp +++ b/src/bridge_map.cpp @@ -7,6 +7,7 @@ #include "bridge_map.h" #include "bridge.h" #include "variables.h" +#include "landscape.h" TileIndex GetBridgeEnd(TileIndex tile, DiagDirection dir) @@ -46,9 +47,6 @@ uint GetBridgeHeight(TileIndex t) Slope tileh = GetTileSlope(t, &h); Foundation f = GetBridgeFoundation(tileh, DiagDirToAxis(GetBridgeRampDirection(t))); - /* one height level extra if the ramp is on a flat foundation */ - return - h + TILE_HEIGHT + - (IsLeveledFoundation(f) ? TILE_HEIGHT : 0) + - (IsSteepSlope(tileh) ? TILE_HEIGHT : 0); + /* one height level extra for the ramp */ + return h + TILE_HEIGHT + ApplyFoundationToSlope(f, &tileh); } |