equal
deleted
inserted
replaced
485 Vehicle *v = GetVehicle(p1); |
485 Vehicle *v = GetVehicle(p1); |
486 |
486 |
487 if (v->type != VEH_AIRCRAFT || !CheckOwnership(v->owner)) return CMD_ERROR; |
487 if (v->type != VEH_AIRCRAFT || !CheckOwnership(v->owner)) return CMD_ERROR; |
488 if (!v->IsStoppedInDepot()) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED); |
488 if (!v->IsStoppedInDepot()) return_cmd_error(STR_A01B_AIRCRAFT_MUST_BE_STOPPED); |
489 |
489 |
|
490 if (HASBITS(v->vehstatus, VS_CRASHED)) return_cmd_error(STR_CAN_T_SELL_DESTROYED_VEHICLE); |
|
491 |
490 SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); |
492 SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); |
491 |
493 |
492 if (flags & DC_EXEC) { |
494 if (flags & DC_EXEC) { |
493 // Invalidate depot |
495 // Invalidate depot |
494 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |
496 InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); |