summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-11 10:45:06 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-11 10:45:06 +0000
commit5f24141cb8ca3fbf7fcce9a30378f938e9206e03 (patch)
tree0906f88869bf7275770611edc4c0286f0131312f /station_cmd.c
parentda428dca703d9c5e8c948bbab9adbb6e7b10d29f (diff)
downloadopenttd-5f24141cb8ca3fbf7fcce9a30378f938e9206e03.tar.xz
(svn r4354) [Elrail][NewGRF] Codechange: Drawing of custom waypoints with custom ground sprites used the index of the rail type as an offset. With the introduction of elrails this offset is incorrect, so instead there is now a lookup table within the RailTypeInfo struct to explicitly list the offset.
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c
index c9c2aefe8..b0a71769b 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1935,7 +1935,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 : railtype;
+ offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset;
image += offset;
// station_land array has been increased from 82 elements to 114