Disable incorrect use of resupply_all() in load and lload

load_land_ship() and load_land_land() automatically resupply the land
units they load.  This can draw supplies from the sector where the
land units are.  When load() and lload() later update the sector, they
wipe out the update made for drawing supplies, and we get a seqno
mismatch oops.  Highly abusable.
This commit is contained in:
Markus Armbruster 2008-05-12 17:22:39 +02:00 committed by Markus Armbruster
parent c083a25277
commit e2eccc5740
2 changed files with 14 additions and 2 deletions

View file

@ -99,8 +99,10 @@ conserve oil. Resources are scarce. Expect to fight over them.
Oil derricks need to set up shop before they produce: no production
while mobility is below maximum.
.s1
Automatic shell supply for sector flak and ship missile defense is
disabled, because its bugs interfere with Hvy Metal modifications.
Automatic shell supply for sector flak, ship flak and ship missile
defense is disabled, because its bugs interfere with Hvy Metal
modifications. Same for automatic supply of land units on loading
them onto ships or land units.
.s1
Missed updates due to server problems will be forced if caught within
15 minutes of planned update time or skipped otherwise.

View file

@ -603,7 +603,14 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
land.lnd_ship = sp->shp_uid;
land.lnd_harden = 0;
land.lnd_mission = 0;
#if 0
/*
* FIXME if this supplies from the sector, the putsect in
* load() / lload() duplicates those supplies, causing a
* seqno mismatch
*/
resupply_all(&land);
#endif
sp->shp_nland++;
putland(land.lnd_uid, &land);
if (!has_supply(&land))
@ -1034,7 +1041,10 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
land.lnd_land = lp->lnd_uid;
land.lnd_harden = 0;
land.lnd_mission = 0;
#if 0
/* FIXME same issue as in load_land_ship() */
resupply_all(&land);
#endif
lp->lnd_nland++;
putland(land.lnd_uid, &land);
if (!has_supply(&land))