changeset 3951:42a0c30766a8 draft

(svn r5097) -Fix: The trolly AI used information from the wrong industry when calculating the amount of to be transported goods
author tron <tron@openttd.org>
date Sun, 04 Jun 2006 13:22:18 +0000
parents 74c06056c90a
children b3db64768651
files ai/trolly/trolly.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ai/trolly/trolly.c
+++ b/ai/trolly/trolly.c
@@ -477,7 +477,7 @@
 					if (GetIndustry(p->ainew.temp)->produced_cargo[0] == GetIndustry(p->ainew.from_ic)->accepts_cargo[i]) {
 						// Found a compatbiel industry
 						found = true;
-						max_cargo = GetIndustry(p->ainew.temp)->total_production[0] - GetIndustry(p->ainew.from_ic)->total_transported[0];
+						max_cargo = GetIndustry(p->ainew.temp)->total_production[0] - GetIndustry(p->ainew.temp)->total_transported[0];
 						p->ainew.from_deliver = false;
 						p->ainew.to_deliver = true;
 						break;