(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:
@@ -1935,7 +1935,7 @@ static void DrawTile_Station(TileInfo *ti)
|
||||
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 : railtype;
|
||||
offset = (image & SPRITE_MASK) < _custom_sprites_base ? rti->total_offset : GetRailTypeInfo(railtype)->custom_ground_offset;
|
||||
image += offset;
|
||||
|
||||
// station_land array has been increased from 82 elements to 114
|
||||
|
Reference in New Issue
Block a user