Mercurial > hg > openttd
changeset 7425:d2dde99b2258 draft
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
author | bjarni <bjarni@openttd.org> |
---|---|
date | Tue, 07 Aug 2007 23:07:10 +0000 |
parents | f1ecba61482e |
children | 55764100284c |
files | src/aircraft_cmd.cpp src/roadveh_cmd.cpp src/ship_cmd.cpp src/train_cmd.cpp |
diffstat | 4 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -452,7 +452,7 @@ RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); if (IsLocalPlayer()) - InvalidateAutoreplaceWindow(VEH_AIRCRAFT, v->group_id); //updates the replace Aircraft window + InvalidateAutoreplaceWindow(v->engine_type, v->group_id); //updates the replace Aircraft window GetPlayer(_current_player)->num_engines[p1]++; }
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -270,7 +270,7 @@ RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); if (IsLocalPlayer()) - InvalidateAutoreplaceWindow(VEH_ROAD, v->group_id); // updates the replace Road window + InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Road window GetPlayer(_current_player)->num_engines[p1]++; }
--- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -897,7 +897,7 @@ RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); if (IsLocalPlayer()) - InvalidateAutoreplaceWindow(VEH_SHIP, v->group_id); // updates the replace Ship window + InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Ship window GetPlayer(_current_player)->num_engines[p1]++;
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -588,7 +588,7 @@ InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); if (IsLocalPlayer()) { - InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window + InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window } GetPlayer(_current_player)->num_engines[engine]++; } @@ -772,7 +772,7 @@ RebuildVehicleLists(); InvalidateWindow(WC_COMPANY, v->owner); if (IsLocalPlayer()) - InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window + InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window GetPlayer(_current_player)->num_engines[p1]++; }