diff options
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index bb26460b4..6188130a0 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -674,7 +674,16 @@ static void DrawCargoIcons(CargoID i, uint waiting, int x, int y) if (num == 0) return; const CargoSpec *cs = GetCargo(i); - SpriteID sprite = cs->sprite; + SpriteID sprite; + + if (cs->sprite == 0xFFFF) { + /* A value of 0xFFFF indicates we should draw a custom icon */ + sprite = GetCustomCargoSprite(cs); + } else { + sprite = cs->sprite; + } + + if (sprite == 0) return; do { DrawSprite(sprite, PAL_NONE, x, y); |