src/rail_cmd.cpp
changeset 9549 41ec95418e84
parent 9504 58b2ee0f53c9
child 9587 82019b7539b3
equal deleted inserted replaced
9548:eae9545bf02c 9549:41ec95418e84
  1845 
  1845 
  1846 		DrawGroundSprite(image, PAL_NONE);
  1846 		DrawGroundSprite(image, PAL_NONE);
  1847 
  1847 
  1848 		if (HasCatenaryDrawn(GetRailType(ti->tile))) DrawCatenary(ti);
  1848 		if (HasCatenaryDrawn(GetRailType(ti->tile))) DrawCatenary(ti);
  1849 
  1849 
  1850 		/* End now if buildings are invisible */
       
  1851 		if (IsInvisibilitySet(TO_BUILDINGS)) return;
       
  1852 
       
  1853 		foreach_draw_tile_seq(dtss, dts->seq) {
  1850 		foreach_draw_tile_seq(dtss, dts->seq) {
  1854 			SpriteID image = dtss->image.sprite;
  1851 			SpriteID image = dtss->image.sprite;
  1855 			SpriteID pal;
  1852 			SpriteID pal;
       
  1853 
       
  1854 			/* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */
       
  1855 			if (IsInvisibilitySet(TO_BUILDINGS) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
  1856 
  1856 
  1857 			/* Unlike stations, our default waypoint has no variation for
  1857 			/* Unlike stations, our default waypoint has no variation for
  1858 			 * different railtype, so don't use the railtype offset if
  1858 			 * different railtype, so don't use the railtype offset if
  1859 			 * no relocation is set */
  1859 			 * no relocation is set */
  1860 			if (HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {
  1860 			if (HasBit(image, SPRITE_MODIFIER_USE_OFFSET)) {