(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles

This commit is contained in:
smatz
2007-12-27 14:10:47 +00:00
parent 384503e7d3
commit 38f0e422ac
5 changed files with 6 additions and 4 deletions

View File

@@ -2134,6 +2134,7 @@ CommandCost CmdRefitRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->type != VEH_ROAD || !CheckOwnership(v->owner)) return CMD_ERROR;
if (!CheckRoadVehInDepotStopped(v)) return_cmd_error(STR_9013_MUST_BE_STOPPED_INSIDE);
if (v->vehstatus & VS_CRASHED) return_cmd_error(STR_CAN_T_REFIT_DESTROYED_VEHICLE);
if (new_cid >= NUM_CARGO) return CMD_ERROR;