Fix mobility cost of automatic supply from remote sector
When a supply request got served completely from a remote sector after some other source had already provided some of it, the sector was charged mobility for the complete amount instead of just the part it actually provided.
This commit is contained in:
parent
ed5ca70cb2
commit
c4a0f99573
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ s_commod(int own, int x, int y, i_type type, int total_wanted,
|
||||||
sect.sct_item[type] -= wanted;
|
sect.sct_item[type] -= wanted;
|
||||||
|
|
||||||
/* take off mobility for delivering sect */
|
/* take off mobility for delivering sect */
|
||||||
n = roundavg(total_wanted * weight * move_cost);
|
n = roundavg(wanted * weight * move_cost);
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
n = 0;
|
n = 0;
|
||||||
if (n > sect.sct_mobil)
|
if (n > sect.sct_mobil)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue