]> git.pond.sub.org Git - empserver/commitdiff
(ship_bomb): Prevent bombing of subs that where not found by the ASW plane.
authorRon Koenderink <rkoenderink@yahoo.ca>
Thu, 16 Dec 2004 12:42:53 +0000 (12:42 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Thu, 16 Dec 2004 12:42:53 +0000 (12:42 +0000)
src/lib/commands/bomb.c

index 58f966b51a378dbec19f602957d6c5603e57f694..befbc13e62461a069d73c5c7aa2acc46d40ded48 100644 (file)
@@ -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);