road_cmd.c
changeset 3418 a592d40a4d04
parent 3415 4d76e72c6ac2
child 3421 8ab76c47c72c
--- a/road_cmd.c	Sun Apr 02 12:41:01 2006 +0000
+++ b/road_cmd.c	Sun Apr 02 12:49:18 2006 +0000
@@ -863,13 +863,13 @@
 	}
 }
 
-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 {