(ship_bomb): Prevent bombing of subs that where not found by the ASW plane.

This commit is contained in:
Ron Koenderink 2004-12-16 12:42:53 +00:00
parent d3396821f0
commit b3f62f7d66

View file

@ -546,12 +546,16 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
n = atoi(q); n = atoi(q);
if (n < 0) if (n < 0)
continue; continue;
if ((plp->pcp->pl_flags & P_A) && !on_shiplist(n, head))
continue;
if (getship(n, &ship) && ship.shp_x == target->sct_x && if (getship(n, &ship) && ship.shp_x == target->sct_x &&
ship.shp_y == target->sct_y) ship.shp_y == target->sct_y)
shipno = n; shipno = n;
} }
if (shipno < 0) if (shipno < 0)
continue; continue;
if ((plp->pcp->pl_flags & P_A) && !on_shiplist(n, head))
continue;
shell = gun = 0; shell = gun = 0;
gun = min(ship.shp_item[I_GUN], ship.shp_glim); gun = min(ship.shp_item[I_GUN], ship.shp_glim);