From 64e63b72e998836f0db4edca5a7b41854c5d0f4f Mon Sep 17 00:00:00 2001 From: terkhen Date: Fri, 11 Jun 2010 20:33:33 +0000 Subject: (svn r19964) -Add: Show an error message when trying to start a crashed or destroyed vehicle. --- src/vehicle_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 11efe9727..2b08f9280 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -80,6 +80,8 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, CommandCost ret = CheckOwnership(v->owner); if (ret.Failed()) return ret; + if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_ERROR_VEHICLE_IS_DESTROYED); + switch (v->type) { case VEH_TRAIN: if ((v->vehstatus & VS_STOPPED) && Train::From(v)->acc_cache.cached_power == 0) return_cmd_error(STR_ERROR_TRAIN_START_NO_CATENARY); -- cgit v1.2.3-70-g09d2