diff options
author | terkhen <terkhen@openttd.org> | 2010-06-11 20:33:33 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-06-11 20:33:33 +0000 |
commit | 64e63b72e998836f0db4edca5a7b41854c5d0f4f (patch) | |
tree | 60df75b5bad6d637ecc85ec07e9d86c5acc50895 /src | |
parent | 3287f9189355f71d55a473096e94dfed4d108cb3 (diff) | |
download | openttd-64e63b72e998836f0db4edca5a7b41854c5d0f4f.tar.xz |
(svn r19964) -Add: Show an error message when trying to start a crashed or destroyed vehicle.
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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); |