(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.

This commit is contained in:
2006-04-11 10:45:06 +00:00
parent da428dca70
commit 5f24141cb8
5 changed files with 21 additions and 4 deletions

View File

@@ -1382,7 +1382,7 @@ static void DrawTile_Track(TileInfo *ti)
* up to the GRF file to decide that. */
image = cust->ground_sprite;
image += (image < _custom_sprites_base) ? rti->total_offset : GetRailType(ti->tile);
image += (image < _custom_sprites_base) ? rti->total_offset : GetRailTypeInfo(GetRailType(ti->tile))->custom_ground_offset;
DrawGroundSprite(image);