forked from mirror/OpenTTD
(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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user