(svn r12588) -Codechange: do not access the destination of an order directly.

This commit is contained in:
rubidium
2008-04-06 07:48:51 +00:00
parent 8cd1795fe3
commit d6623cf654
18 changed files with 116 additions and 108 deletions

View File

@@ -1969,7 +1969,7 @@ int WhoCanServiceIndustry(Industry* ind)
FOR_VEHICLE_ORDERS(v, o) {
if (o->IsType(OT_GOTO_STATION) && !HasBit(o->flags, OF_TRANSFER)) {
/* Vehicle visits a station to load or unload */
Station *st = GetStation(o->dest);
Station *st = GetStation(o->GetDestination());
if (!st->IsValid()) continue;
/* Same cargo produced by industry is dropped here => not serviced by vehicle v */