diff options
author | peter1138 <peter1138@openttd.org> | 2006-04-11 10:45:06 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-04-11 10:45:06 +0000 |
commit | 5f24141cb8ca3fbf7fcce9a30378f938e9206e03 (patch) | |
tree | 0906f88869bf7275770611edc4c0286f0131312f /waypoint.c | |
parent | da428dca703d9c5e8c948bbab9adbb6e7b10d29f (diff) | |
download | openttd-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 'waypoint.c')
-rw-r--r-- | waypoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/waypoint.c b/waypoint.c index 715c530b3..00cc4f941 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 : railtype; + img += (img < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset; if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK); DrawSprite(img, x, y); |