From c4a0f995738aae75e9bdf340f56eabed7f6494e1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 15 Feb 2009 14:20:12 +0100 Subject: [PATCH] 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. --- src/lib/subs/supply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/subs/supply.c b/src/lib/subs/supply.c index 5e55b5e38..d6203a32c 100644 --- a/src/lib/subs/supply.c +++ b/src/lib/subs/supply.c @@ -202,7 +202,7 @@ s_commod(int own, int x, int y, i_type type, int total_wanted, sect.sct_item[type] -= wanted; /* take off mobility for delivering sect */ - n = roundavg(total_wanted * weight * move_cost); + n = roundavg(wanted * weight * move_cost); if (n < 0) n = 0; if (n > sect.sct_mobil) -- 2.43.0