From b3f62f7d66d5ee7ed62d1d36919b52df2e19463e Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Thu, 16 Dec 2004 12:42:53 +0000 Subject: [PATCH] (ship_bomb): Prevent bombing of subs that where not found by the ASW plane. --- src/lib/commands/bomb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 58f966b5..befbc13e 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -546,12 +546,16 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target) n = atoi(q); if (n < 0) continue; + if ((plp->pcp->pl_flags & P_A) && !on_shiplist(n, head)) + continue; if (getship(n, &ship) && ship.shp_x == target->sct_x && ship.shp_y == target->sct_y) shipno = n; } if (shipno < 0) continue; + if ((plp->pcp->pl_flags & P_A) && !on_shiplist(n, head)) + continue; shell = gun = 0; gun = min(ship.shp_item[I_GUN], ship.shp_glim);