Mercurial > hg > openttd
changeset 15323:7ef84bf590b7 draft
(svn r19964) -Add: Show an error message when trying to start a crashed or destroyed vehicle.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Fri, 11 Jun 2010 20:33:33 +0000 |
parents | ff08f0eb701d |
children | 9d6b32ed8cfc |
files | src/vehicle_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -80,6 +80,8 @@ 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);