summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-01-23 22:01:51 +0000
committerbjarni <bjarni@openttd.org>2005-01-23 22:01:51 +0000
commit6510b12203b0770d111055e5112e9a824d0f7dc7 (patch)
tree7af224941eb94f777a9d568f72669a0e333a159e /roadveh_cmd.c
parentdd6a6fa7ecd3f7f7389ea4ac86cbb03875d16caa (diff)
downloadopenttd-6510b12203b0770d111055e5112e9a824d0f7dc7.tar.xz
(svn r1629) added a counter to tell how many engines you have of each type to the autoreplace vehicle windows and made them show only the vehicles you actually have in the left list.
this also fixes some window updates issues when autoreplacing
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index b8879b2b2..97429a1af 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -188,6 +188,8 @@ int32 CmdBuildRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
InvalidateWindow(WC_COMPANY, v->owner);
}
+ InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
+
return cost;
}
@@ -234,6 +236,7 @@ int32 CmdSellRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2)
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
DeleteVehicle(v);
}
+ InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Road); // updates the replace Road window
return -(int32)v->value;
}