(svn r9871) -Fix (r8826): Some cargo costs were wrong for different climates. Multiple definitions of the same cargo type are sometimes required.

This commit is contained in:
peter1138
2007-05-18 21:50:32 +00:00
parent 49570edfe9
commit b8a82dcb05
2 changed files with 36 additions and 16 deletions

View File

@@ -33,6 +33,14 @@ void SetupCargoForClimate(LandscapeID l)
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++) {