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().
This commit is contained in:
parent
e7aa3627c4
commit
312b28f5fa
1 changed files with 7 additions and 0 deletions
|
@ -829,12 +829,19 @@ ac_shipflak(struct emp_qelem *list, coord x, coord y)
|
||||||
gun = shp_usable_guns(&ship);
|
gun = shp_usable_guns(&ship);
|
||||||
if (gun) {
|
if (gun) {
|
||||||
shell = ship.shp_item[I_SHELL];
|
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) {
|
if (shell <= 0) {
|
||||||
shell = supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
|
shell = supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
|
||||||
I_SHELL, 1);
|
I_SHELL, 1);
|
||||||
ship.shp_item[I_SHELL] = shell;
|
ship.shp_item[I_SHELL] = shell;
|
||||||
putship(ship.shp_uid, &ship);
|
putship(ship.shp_uid, &ship);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (gun == 0 || shell == 0)
|
if (gun == 0 || shell == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue