(svn r5109) - Backport from trunk (r5097): 0.4
authorDarkvater
Sun, 04 Jun 2006 22:03:58 +0000
branch0.4
changeset 10030 c02a2ccf5e72
parent 10029 6b57ecabf961
child 10031 97ad14cf1b70
(svn r5109) - Backport from trunk (r5097):
The trolly AI used information from the wrong industry when calculating the
amount of to be transported goods
ai/trolly/trolly.c
--- a/ai/trolly/trolly.c	Sun Jun 04 22:02:51 2006 +0000
+++ b/ai/trolly/trolly.c	Sun Jun 04 22:03:58 2006 +0000
@@ -482,7 +482,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;