Supply charged mobility for backward path

It used the path from supply recipient back to supply source.  Has
always been broken that way.
This commit is contained in:
Markus Armbruster 2011-02-18 20:05:32 +01:00
parent 86a187c04f
commit 0095b0c979

View file

@ -176,7 +176,7 @@ s_commod(struct empobj *sink, short *vec,
continue; continue;
if (sect.sct_effic < 60) if (sect.sct_effic < 60)
continue; continue;
if (!BestLandPath(buf, &dest, &sect, &move_cost, MOB_MOVE)) if (!BestLandPath(buf, &sect, &dest, &move_cost, MOB_MOVE))
continue; continue;
if (!opt_NOFOOD && type == I_FOOD) if (!opt_NOFOOD && type == I_FOOD)
minimum = 1 + (int)ceil(food_needed(sect.sct_item, minimum = 1 + (int)ceil(food_needed(sect.sct_item,
@ -248,7 +248,7 @@ s_commod(struct empobj *sink, short *vec,
continue; continue;
if (sect.sct_effic < 2) if (sect.sct_effic < 2)
continue; continue;
if (!BestLandPath(buf, &dest, &sect, &move_cost, MOB_MOVE)) if (!BestLandPath(buf, &sect, &dest, &move_cost, MOB_MOVE))
continue; continue;
if (!opt_NOFOOD && type == I_FOOD) if (!opt_NOFOOD && type == I_FOOD)
minimum = 1 + (int)ceil(food_needed(ship.shp_item, minimum = 1 + (int)ceil(food_needed(ship.shp_item,
@ -322,7 +322,7 @@ s_commod(struct empobj *sink, short *vec,
continue; continue;
getsect(land.lnd_x, land.lnd_y, &sect); getsect(land.lnd_x, land.lnd_y, &sect);
if (!BestLandPath(buf, &dest, &sect, &move_cost, MOB_MOVE)) if (!BestLandPath(buf, &sect, &dest, &move_cost, MOB_MOVE))
continue; continue;
if ((land.lnd_ship >= 0) && (sect.sct_type != SCT_HARBR)) if ((land.lnd_ship >= 0) && (sect.sct_type != SCT_HARBR))