]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/bomb.c
Factor out ship usable gun calculation into shp_usable_gun()
[empserver] / src / lib / commands / bomb.c
index 72e4f1f95d34fd3bb133a51899dabc021a7c6db5..a0f8c62959d682c4f481333c4de9975793dcfe9f 100644 (file)
@@ -523,8 +523,8 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
        if ((plp->pcp->pl_flags & P_A) && !on_shiplist(shipno, head))
            continue;
 
-       shell = gun = 0;
-       gun = MIN(ship.shp_item[I_GUN], ship.shp_glim);
+       shell = 0;
+       gun = shp_usable_guns(&ship);
        if (gun > 0) {
            shell = ship.shp_item[I_SHELL];
            if (shell <= 0)