diff options
-rw-r--r-- | rail_cmd.c | 2 | ||||
-rw-r--r-- | station_cmd.c | 2 | ||||
-rw-r--r-- | waypoint.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 4947fb7ab..20db9c4f5 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1329,7 +1329,7 @@ static void DrawTile_Track(TileInfo *ti) * up to the GRF file to decide that. */ image = cust->ground_sprite; - image += (image < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(GetRailType(ti->tile))->custom_ground_offset; + image += (image < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset; DrawGroundSprite(image); diff --git a/station_cmd.c b/station_cmd.c index 5bd870ce0..7e60b7d4c 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1955,7 +1955,7 @@ static void DrawTile_Station(TileInfo *ti) if (image & PALETTE_MODIFIER_COLOR) image |= image_or_modificator; // For custom sprites, there's no railtype-based pitching. - offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset; + offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : rti->custom_ground_offset; image += offset; // station_land array has been increased from 82 elements to 114 diff --git a/waypoint.c b/waypoint.c index 00cc4f941..ea034529a 100644 --- a/waypoint.c +++ b/waypoint.c @@ -412,7 +412,7 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype) cust = &stat->renderdata[2]; img = cust->ground_sprite; - img += (img < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset; + img += (img < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset; if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK); DrawSprite(img, x, y); |