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.
This commit is contained in:
Markus Armbruster 2009-02-15 07:48:12 +01:00
parent d58b306780
commit 2b7163f10a

View file

@ -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);
}
}
}