# HG changeset patch # User tron # Date 1100725876 0 # Node ID 75cdae7cd92bdb3ca2456458f9d20505e431bb42 # Parent 9486c6bc637c6d0a5201369d191ebabb8ad826d0 (svn r667) Fix bug in rendering stations from savegames Also don't pitch custom station sprites by railtype (pasky) diff -r 9486c6bc637c -r 75cdae7cd92b station_cmd.c --- a/station_cmd.c Wed Nov 17 20:30:34 2004 +0000 +++ b/station_cmd.c Wed Nov 17 21:11:16 2004 +0000 @@ -1941,13 +1941,13 @@ // 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 {