changeset 3527:78187ecf345e draft

(svn r4383) - Codechange: Remove extraneous code from 4354; no need to get RailTypeInfo when we already have it...
author peter1138 <peter1138@openttd.org>
date Wed, 12 Apr 2006 12:33:21 +0000
parents 4aa6ba1ddb14
children b55a94c93b99
files rail_cmd.c station_cmd.c waypoint.c
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1329,7 +1329,7 @@
 				 * up to the GRF file to decide that. */
 
 				image = cust->ground_sprite;
-				image += (image < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(GetRailType(ti->tile))->custom_ground_offset;
+				image += (image < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset;
 
 				DrawGroundSprite(image);
 
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1955,7 +1955,7 @@
 	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 : GetRailTypeInfo(railtype)->custom_ground_offset;
+	offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : rti->custom_ground_offset;
 	image += offset;
 
 	// station_land array has been increased from 82 elements to 114
--- a/waypoint.c
+++ b/waypoint.c
@@ -412,7 +412,7 @@
 	cust = &stat->renderdata[2];
 
 	img = cust->ground_sprite;
-	img += (img < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset;
+	img += (img < _custom_sprites_base) ? rti->total_offset : rti->custom_ground_offset;
 
 	if (img & PALETTE_MODIFIER_COLOR) img = (img & SPRITE_MASK);
 	DrawSprite(img, x, y);