diff options
author | rubidium <rubidium@openttd.org> | 2007-10-08 20:06:37 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-08 20:06:37 +0000 |
commit | b6c9bc80cfef26490562b0c7a07a1adfc6d08ede (patch) | |
tree | 558ec5c75aee553211edcce8233c8d5af44e12e8 /src/roadveh_cmd.cpp | |
parent | cb6cdf7978501a894d0322b4371fa449320ceb28 (diff) | |
download | openttd-b6c9bc80cfef26490562b0c7a07a1adfc6d08ede.tar.xz |
(svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 012747bba..7f7799bfb 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -359,6 +359,8 @@ CommandCost CmdSellRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (v->type != VEH_ROAD || !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); if (!CheckRoadVehInDepotStopped(v)) { |