From 312b28f5fa15a2e387c3588330d5c97178c28ef5 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 10 May 2008 09:27:52 +0200 Subject: [PATCH] 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(). --- src/lib/subs/aircombat.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.43.0