src/cargotype.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9908 0fa543611bbe
child 9722 ebf0ece7d8f6
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
    30 
    30 
    31 	_cargo_mask = 0;
    31 	_cargo_mask = 0;
    32 
    32 
    33 	for (CargoID i = 0; i < lengthof(_default_climate_cargo[l]); i++) {
    33 	for (CargoID i = 0; i < lengthof(_default_climate_cargo[l]); i++) {
    34 		CargoLabel cl = _default_climate_cargo[l][i];
    34 		CargoLabel cl = _default_climate_cargo[l][i];
       
    35 
       
    36 		/* Bzzt: check if cl is just an index into the cargo table */
       
    37 		if (cl < lengthof(_default_cargo)) {
       
    38 			/* Copy the indexed cargo */
       
    39 			_cargo[i] = _default_cargo[cl];
       
    40 			SETBIT(_cargo_mask, i);
       
    41 			continue;
       
    42 		}
    35 
    43 
    36 		/* Loop through each of the default cargo types to see if
    44 		/* Loop through each of the default cargo types to see if
    37 		 * the label matches */
    45 		 * the label matches */
    38 		for (uint j = 0; j < lengthof(_default_cargo); j++) {
    46 		for (uint j = 0; j < lengthof(_default_cargo); j++) {
    39 			if (_default_cargo[j].label == cl) {
    47 			if (_default_cargo[j].label == cl) {