From 2b7163f10a4c71a029f611a3bee39054a9f49b92 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 15 Feb 2009 07:48:12 +0100 Subject: [PATCH] Remove special case supply of land units from ships carrying them The common supply code does not supply a land unit from the ship carrying it, only resupply_all() does that, since 4.3.14. It would be nice to fix the inconsistency by always supplying land units that way, but that's relatively costly now, because of the supply code's design. Just drop it for now. Affects load and lload (except resupply is disabled there because it's buggy), supply, assault and board. --- src/lib/subs/supply.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/lib/subs/supply.c b/src/lib/subs/supply.c index 6888b91b..1a10d19a 100644 --- a/src/lib/subs/supply.c +++ b/src/lib/subs/supply.c @@ -77,29 +77,12 @@ void resupply_commod(struct lndstr *lp, i_type type) { int amt; - struct shpstr ship; - /* Ok, do we now have enough? */ amt = get_minimum(lp, type) - lp->lnd_item[type]; if (amt > 0) { lp->lnd_item[type] += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y, type, amt); - amt = get_minimum(lp, type) - lp->lnd_item[type]; - } - /* Now, check again to see if we have enough. */ - if (amt > 0) { - /* Are we on a ship? if so, try to get it from the ship first. */ - if (lp->lnd_ship >= 0) { - getship(lp->lnd_ship, &ship); - /* Now, determine how much we can get */ - if (amt > ship.shp_item[type]) - amt = ship.shp_item[type]; - /* Now, add and subtract */ - lp->lnd_item[type] += amt; - ship.shp_item[type] -= amt; - putship(lp->lnd_ship, &ship); - } } }