(svn r25361) -Feature: distribute cargo according to plan given by linkgraph
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
* to the current tile of the vehicle to prevent excessive profits
|
||||
*/
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
const VehicleCargoList::List *packets = v->cargo.Packets();
|
||||
const CargoPacketList *packets = v->cargo.Packets();
|
||||
for (VehicleCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
|
||||
CargoPacket *cp = *it;
|
||||
cp->source_xy = Station::IsValidID(cp->source) ? Station::Get(cp->source)->xy : v->tile;
|
||||
@@ -47,7 +47,7 @@
|
||||
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||
GoodsEntry *ge = &st->goods[c];
|
||||
|
||||
const StationCargoList::List *packets = ge->cargo.Packets();
|
||||
const StationCargoPacketMap *packets = ge->cargo.Packets();
|
||||
for (StationCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
|
||||
CargoPacket *cp = *it;
|
||||
cp->source_xy = Station::IsValidID(cp->source) ? Station::Get(cp->source)->xy : st->xy;
|
||||
|
Reference in New Issue
Block a user