diff options
author | celestar <celestar@openttd.org> | 2007-01-15 14:42:24 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2007-01-15 14:42:24 +0000 |
commit | f69794b8c1c5dcf511e1b4a6aed20bda1bfba312 (patch) | |
tree | cad841bb152e6112359e6b75928562e7161a7c26 /src/station_cmd.cpp | |
parent | f8c650fa3ac57848c8be7c1d52d21dbfd6d180a6 (diff) | |
download | openttd-f69794b8c1c5dcf511e1b4a6aed20bda1bfba312.tar.xz |
(svn r8144) -Fix: [FS#163] When a station is removed, vehicles do not get excessive payment any longer, as the origin TILE is now stored as long as the origin STATION for the transported cargos. Basically this is only a temporary fix until cargopackets are implemented, but it fixes one of the oldest known bugs (Special Thanks to Darkvater for lots of testing)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 351c55aff..417dbf775 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2533,6 +2533,7 @@ static void UpdateStationWaiting(Station *st, int type, uint amount) st->goods[type].enroute_time = 0; st->goods[type].enroute_from = st->index; + st->goods[type].enroute_from_xy = st->xy; InvalidateWindow(WC_STATION_VIEW, st->index); st->MarkTilesDirty(); } @@ -2748,6 +2749,7 @@ void BuildOilRig(TileIndex tile) st->goods[j].waiting_acceptance = 0; st->goods[j].days_since_pickup = 0; st->goods[j].enroute_from = INVALID_STATION; + st->goods[j].enroute_from_xy = INVALID_TILE; st->goods[j].rating = 175; st->goods[j].last_speed = 0; st->goods[j].last_age = 255; @@ -2958,6 +2960,7 @@ static const SaveLoad _goods_desc[] = { SLE_VAR(GoodsEntry, rating, SLE_UINT8), SLE_CONDVAR(GoodsEntry, enroute_from, SLE_FILE_U8 | SLE_VAR_U16, 0, 6), SLE_CONDVAR(GoodsEntry, enroute_from, SLE_UINT16, 7, SL_MAX_VERSION), + SLE_CONDVAR(GoodsEntry, enroute_from_xy, SLE_UINT32, 44, SL_MAX_VERSION), SLE_VAR(GoodsEntry, enroute_time, SLE_UINT8), SLE_VAR(GoodsEntry, last_speed, SLE_UINT8), SLE_VAR(GoodsEntry, last_age, SLE_UINT8), |