summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-17 21:11:16 +0000
committertron <tron@openttd.org>2004-11-17 21:11:16 +0000
commit83ffb9c7fa2d935c23eb2d866ad8719a25516c82 (patch)
tree9de3e8eb96c1f2e67526dc69788be69131762908 /station_cmd.c
parent258ffc13825d400129d4dbaf54cf777522afaf78 (diff)
downloadopenttd-83ffb9c7fa2d935c23eb2d866ad8719a25516c82.tar.xz
(svn r667) Fix bug in rendering stations from savegames
Also don't pitch custom station sprites by railtype (pasky)
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 020489ba2..cfaa2cd0e 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1941,13 +1941,13 @@ static void DrawTile_Station(TileInfo *ti)
// station_land array has been increased from 82 elements to 114
// but this is something else. If AI builds station with 114 it looks all weird
- image += railtype * ((image < _custom_sprites_base) ? TRACKTYPE_SPRITE_PITCH : 1);
+ image += railtype * ((image & 0x3FFF) < _custom_sprites_base ? TRACKTYPE_SPRITE_PITCH : 1);
DrawGroundSprite(image);
foreach_draw_tile_seq(dtss, t->seq) {
image = dtss->image + relocation;
- // XXX: Do we want to do this for custom stations? --pasky
- image += railtype * ((image < _custom_sprites_base) ? TRACKTYPE_SPRITE_PITCH : 1);
+ // For custom sprites, there's no railtype-based pitching.
+ image += railtype * ((image & 0x3FFF) < _custom_sprites_base ? TRACKTYPE_SPRITE_PITCH : 0);
if (_display_opt & DO_TRANS_BUILDINGS) {
if (image&0x8000) image |= image_or_modificator;
} else {