(ship_bomb): Prevent bombing of subs that where not found by the ASW plane.
This commit is contained in:
parent
d3396821f0
commit
b3f62f7d66
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue