summaryrefslogtreecommitdiff
path: root/road_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-02 12:49:18 +0000
committertron <tron@openttd.org>2006-04-02 12:49:18 +0000
commit892a4c587dfd1427fcebf3081520524a2c822ae6 (patch)
tree6165bdad32d288513a9323a661873fa96839184c /road_cmd.c
parente9a5ca70e2b04f6df8f719e8649b4a629ba49475 (diff)
downloadopenttd-892a4c587dfd1427fcebf3081520524a2c822ae6.tar.xz
(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo
Diffstat (limited to 'road_cmd.c')
-rw-r--r--road_cmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/road_cmd.c b/road_cmd.c
index 5e961254a..7edc503f7 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -863,13 +863,13 @@ static uint GetSlopeZ_Road(const TileInfo* ti)
}
}
-static uint GetSlopeTileh_Road(const TileInfo *ti)
+static uint GetSlopeTileh_Road(TileIndex tile, uint tileh)
{
- if (ti->tileh == 0) return ti->tileh;
- if (GetRoadType(ti->tile) == ROAD_NORMAL) {
- uint f = GetRoadFoundation(ti->tileh, GetRoadBits(ti->tile));
+ if (tileh == 0) return 0;
+ if (GetRoadType(tile) == ROAD_NORMAL) {
+ uint f = GetRoadFoundation(tileh, GetRoadBits(tile));
- if (f == 0) return ti->tileh;
+ if (f == 0) return tileh;
if (f < 15) return 0; // leveled foundation
return _inclined_tileh[f - 15]; // inclined foundation
} else {