From: Markus Armbruster Date: Sat, 10 May 2008 07:27:52 +0000 (+0200) Subject: Disable another incorrect use of supply_commod() X-Git-Tag: hvy-metal-2.1~5 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=6ae83d34e92388a826d2b9c72bdd509fe54d3e60 Disable another incorrect use of supply_commod() navi() reads the ships into a list. When the ships get interdicted, and lack flak shells, ac_shipflak() tries to get one and updates the ship. When the ship in the list is later written back, e.g. to apply interdiction damage, the flak shell is wiped out, and we get a seqno mismatch oops. Disable automatic flak shell supply in ac_ship_flak() for now. This is related to commit f7d61817, which disabled automatic supply of shells in ac_doflak() and shp_missile_defense(). --- diff --git a/src/lib/subs/aircombat.c b/src/lib/subs/aircombat.c index 106b79775..ad6d84393 100644 --- a/src/lib/subs/aircombat.c +++ b/src/lib/subs/aircombat.c @@ -829,12 +829,19 @@ ac_shipflak(struct emp_qelem *list, coord x, coord y) gun = shp_usable_guns(&ship); if (gun) { shell = ship.shp_item[I_SHELL]; +#if 0 + /* + * FIXME if this supplies the ship while it is being + * interdicted, we get a seqno mismatch when interdiction + * damage is applied. + */ if (shell <= 0) { shell = supply_commod(ship.shp_own, ship.shp_x, ship.shp_y, I_SHELL, 1); ship.shp_item[I_SHELL] = shell; putship(ship.shp_uid, &ship); } +#endif } if (gun == 0 || shell == 0) continue;