summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-04 11:01:35 +0000
committertron <tron@openttd.org>2006-03-04 11:01:35 +0000
commit4270026b4248bbaa1b1b46b099baadbd24921dd0 (patch)
tree2eef654bc6b8956ee2e2ff73c1a3f6e72b920031 /aircraft_cmd.c
parent006444a0dcb20f44d5be0f7827b68fa379c4d77a (diff)
downloadopenttd-4270026b4248bbaa1b1b46b099baadbd24921dd0.tar.xz
(svn r3757) -Feature: Delete news items about vehicles, when they get stale
This is used to delete - all news about a vehicle, when it gets deleted - "vehicle has stopped in depot" news, when it gets started - "vehicle has invalid orders" news, when the orders get changed
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 5d2b32c2c..954667c64 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -382,6 +382,10 @@ int32 CmdStartStopAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(STR_A017_AIRCRAFT_IS_IN_FLIGHT);
if (flags & DC_EXEC) {
+ if (v->vehstatus & VS_STOPPED && IsAircraftHangarTile(v->tile)) {
+ DeleteVehicleNews(p1, STR_A014_AIRCRAFT_IS_WAITING_IN);
+ }
+
v->vehstatus ^= VS_STOPPED;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);