src/cargotype.cpp
branchnoai
changeset 9624 b71483f2330f
parent 9599 949374e83b78
child 9722 ebf0ece7d8f6
--- a/src/cargotype.cpp	Fri May 11 15:13:08 2007 +0000
+++ b/src/cargotype.cpp	Fri May 25 00:25:08 2007 +0000
@@ -33,6 +33,14 @@
 	for (CargoID i = 0; i < lengthof(_default_climate_cargo[l]); i++) {
 		CargoLabel cl = _default_climate_cargo[l][i];
 
+		/* Bzzt: check if cl is just an index into the cargo table */
+		if (cl < lengthof(_default_cargo)) {
+			/* Copy the indexed cargo */
+			_cargo[i] = _default_cargo[cl];
+			SETBIT(_cargo_mask, i);
+			continue;
+		}
+
 		/* Loop through each of the default cargo types to see if
 		 * the label matches */
 		for (uint j = 0; j < lengthof(_default_cargo); j++) {