summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-27 14:10:47 +0000
committersmatz <smatz@openttd.org>2007-12-27 14:10:47 +0000
commitc10d3da133d2c9084edffbea0a431f49813af763 (patch)
treed00313ff1fa98add9f7bf3b2cbc41ad0c640eab3 /src/aircraft_cmd.cpp
parent722613f7f3d833e28193f4c628161a372aa346b5 (diff)
downloadopenttd-c10d3da133d2c9084edffbea0a431f49813af763.tar.xz
(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 7decc69e0..885028422 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -640,6 +640,7 @@ CommandCost CmdRefitAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->type != VEH_AIRCRAFT || !CheckOwnership(v->owner)) return CMD_ERROR;
if (!v->IsStoppedInDepot()) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED);
+ if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_CAN_T_REFIT_DESTROYED_VEHICLE);
/* Check cargo */
CargoID new_cid = GB(p2, 0, 8);