From 4270026b4248bbaa1b1b46b099baadbd24921dd0 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 4 Mar 2006 11:01:35 +0000 Subject: (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 --- roadveh_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roadveh_cmd.c') diff --git a/roadveh_cmd.c b/roadveh_cmd.c index a40801a97..b12debae4 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -216,6 +216,10 @@ int32 CmdStartStopRoadVeh(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (v->type != VEH_Road || !CheckOwnership(v->owner)) return CMD_ERROR; if (flags & DC_EXEC) { + if (v->vehstatus & VS_STOPPED && v->u.road.state == 254) { + DeleteVehicleNews(p1, STR_9016_ROAD_VEHICLE_IS_WAITING); + } + v->vehstatus ^= VS_STOPPED; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); -- cgit v1.2.3-54-g00ecf