From: Markus Armbruster Date: Sun, 15 Feb 2009 06:30:23 +0000 (+0100) Subject: Don't resupply supply unit after use as supply source X-Git-Tag: v4.3.20~13 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=07561b4772ab5b43cc80425c0f06326022b1f3d1 Don't resupply supply unit after use as supply source Running supply recursively here is problematic, because it can draw supplies from the outer supply's destination, which can then end up with less than it asked for. Serving as supply source never puts a unit that is in supply out of supply. So, the recursive supply here denies the sink its supplies to put a supply unit somewhere else back in supply. That's robbing Peter to pay Paul. Drop it. --- diff --git a/src/lib/subs/supply.c b/src/lib/subs/supply.c index 1a10d19a8..ce5bf8946 100644 --- a/src/lib/subs/supply.c +++ b/src/lib/subs/supply.c @@ -353,10 +353,6 @@ s_commod(int own, int x, int y, i_type type, int total_wanted, if (can_move >= wanted) { land.lnd_item[type] -= wanted; - - /* resupply the supply unit */ - resupply_commod(&land, type); - land.lnd_mobil -= roundavg(wanted * weight * move_cost); if (actually_doit)