# HG changeset patch # User peter1138 # Date 1165170522 0 # Node ID 1530d0cdf648783b08b10502d882a27b0ebd44b7 # Parent f8f37c282c2d5898fbf6346597e3cbcaec18031d (svn r7335) -Codechange: redraw station tiles when cargo is moved, for newstations diff -r f8f37c282c2d -r 1530d0cdf648 economy.c --- a/economy.c Sun Dec 03 17:54:28 2006 +0000 +++ b/economy.c Sun Dec 03 18:28:42 2006 +0000 @@ -1500,6 +1500,7 @@ if (result != 0) { InvalidateWindow(WC_VEHICLE_DETAILS, v->index); + MarkStationTilesDirty(st); if (result & 2) InvalidateWindow(WC_STATION_VIEW, last_visited); diff -r f8f37c282c2d -r 1530d0cdf648 station.h --- a/station.h Sun Dec 03 17:54:28 2006 +0000 +++ b/station.h Sun Dec 03 18:28:42 2006 +0000 @@ -210,6 +210,7 @@ void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad); uint GetStationPlatforms(const Station *st, TileIndex tile); uint GetPlatformLength(TileIndex tile, DiagDirection dir); +void MarkStationTilesDirty(const Station *st); const DrawTileSprites *GetStationTileLayout(byte gfx); diff -r f8f37c282c2d -r 1530d0cdf648 station_cmd.c --- a/station_cmd.c Sun Dec 03 17:54:28 2006 +0000 +++ b/station_cmd.c Sun Dec 03 18:28:42 2006 +0000 @@ -79,7 +79,7 @@ return IsTileType(tile, MP_STATION) && GetStationIndex(tile) == st->index && IsRailwayStation(tile); } -static void MarkStationTilesDirty(const Station *st) +void MarkStationTilesDirty(const Station *st) { TileIndex tile = st->train_tile; int w, h; @@ -2591,6 +2591,7 @@ st->goods[type].enroute_time = 0; st->goods[type].enroute_from = st->index; InvalidateWindow(WC_STATION_VIEW, st->index); + MarkStationTilesDirty(st); } /** Rename a station