diff options
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 1b725e84a..4757db3d2 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1216,6 +1216,8 @@ CommandCost CmdSellRailWagon(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (v->type != VEH_TRAIN || !CheckOwnership(v->owner)) return CMD_ERROR; + if (HASBITS(v->vehstatus, VS_CRASHED)) return_cmd_error(STR_CAN_T_SELL_DESTROYED_VEHICLE); + SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); while (IsArticulatedPart(v)) v = v->Previous(); |