economy.c
changeset 3655 f91f341a613e
parent 3613 f96401ae2873
child 4077 d4d440dd8925
equal deleted inserted replaced
3654:c09872510a61 3655:f91f341a613e
  1238 	profit = GetTransportedGoodsIncome(num_pieces, DistanceManhattan(s_from->xy, s_to->xy), days_in_transit, cargo_type);
  1238 	profit = GetTransportedGoodsIncome(num_pieces, DistanceManhattan(s_from->xy, s_to->xy), days_in_transit, cargo_type);
  1239 
  1239 
  1240 	// Modify profit if a subsidy is in effect
  1240 	// Modify profit if a subsidy is in effect
  1241 	if (subsidised) {
  1241 	if (subsidised) {
  1242 		switch (_opt.diff.subsidy_multiplier) {
  1242 		switch (_opt.diff.subsidy_multiplier) {
  1243 			case 0:  profit += profit >> 1;
  1243 			case 0:  profit += profit >> 1; break;
  1244 			case 1:  profit *= 2;
  1244 			case 1:  profit *= 2; break;
  1245 			case 2:  profit *= 3;
  1245 			case 2:  profit *= 3; break;
  1246 			default: profit *= 4;
  1246 			default: profit *= 4; break;
  1247 		}
  1247 		}
  1248 	}
  1248 	}
  1249 
  1249 
  1250 	return profit;
  1250 	return profit;
  1251 }
  1251 }