diff options
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 1f61b7e6f..092ed6f77 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1770,15 +1770,15 @@ static uint GetSlopeZ_Track(const TileInfo* ti) } } -static uint GetSlopeTileh_Track(const TileInfo *ti) +static uint GetSlopeTileh_Track(TileIndex tile, uint tileh) { - if (ti->tileh == 0) return ti->tileh; - if (GetRailTileType(ti->tile) == RAIL_TYPE_DEPOT_WAYPOINT) { + if (tileh == 0) return 0; + if (GetRailTileType(tile) == RAIL_TYPE_DEPOT_WAYPOINT) { return 0; } else { - uint f = GetRailFoundation(ti->tileh, GetTrackBits(ti->tile)); + uint f = GetRailFoundation(tileh, GetTrackBits(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 } |