Mercurial > hg > openttd
changeset 9883:369c99a0b939 draft
(svn r14031) -Fix (r13850): Determining the refit cargo did not work, when the old vehicle did not carry anything but the new one did.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 09 Aug 2008 16:42:55 +0000 |
parents | 90de18446acf |
children | c7d1c11e632b |
files | src/autoreplace_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -123,7 +123,7 @@ /* Do we have to refit the vehicle, or is it already carrying the right cargo? */ uint16 *default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); for (CargoID cid = 0; cid < NUM_CARGO; cid++) { - if (cid != cargo_type && default_capacity[cid] > 0) return cargo_type; + if (cid != v->cargo_type && default_capacity[cid] > 0) return v->cargo_type; } return CT_NO_REFIT;