From 221027aca55ca61541927177d73d2600507796e1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 3 Oct 2009 15:57:49 -0400 Subject: [PATCH] Fix bomb for non-tactical cargo bomber The various bombing functions silently skipped planes not carrying bombs. This sanity check was wrong: it checked capabilities "tactical or not cargo" instead of "tactical or bomber", and failed for non-tactical cargo bombers. No such planes exist in the stock game. The broken check comes from Chainsaw; it replaced an equally wrong "not cargo" check. Because pln_sel() lets only suitable planes go on a bombing run, the broken sanity check is unnecessary. Drop it. --- src/lib/commands/bomb.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 2a8bbeb2..f3a2c44f 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -344,8 +344,6 @@ eff_bomb(struct emp_qelem *list, struct sctstr *target) plp = (struct plist *)qp; if (changed_plane_aborts(plp)) continue; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; if (plp->bombs || nuk_on_plane(&plp->plane) >= 0) dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 1); @@ -424,8 +422,6 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target) plp = (struct plist *)qp; if (changed_plane_aborts(plp)) continue; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; if (plp->bombs || nuk_on_plane(&plp->plane) >= 0) dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, 'p', &nukedam, 1); @@ -478,8 +474,6 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target) plp = (struct plist *)qp; if (changed_plane_aborts(plp)) continue; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; if (plp->pcp->pl_flags & P_A) nships = asw_shipsatxy(target->sct_x, target->sct_y, 0, 0, &plp->plane, &head); @@ -605,8 +599,6 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target) plp = (struct plist *)qp; if (changed_plane_aborts(plp)) continue; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; nplanes = planesatxy(target->sct_x, target->sct_y, 0, 0); if (nplanes == 0) { pr("%s could not find any planes!\n", prplane(&plp->plane)); @@ -711,8 +703,6 @@ land_bomb(struct emp_qelem *list, struct sctstr *target) plp = (struct plist *)qp; if (changed_plane_aborts(plp)) continue; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; nunits = unitsatxy(target->sct_x, target->sct_y, 0, 0); if (nunits == 0) { pr("%s could not find any units!\n", prplane(&plp->plane)); @@ -806,8 +796,6 @@ strat_bomb(struct emp_qelem *list, struct sctstr *target) for (qp = list->q_forw; qp != list; qp = qp->q_forw) { plp = (struct plist *)qp; - if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T))) - continue; if (plp->bombs || nuk_on_plane(&plp->plane) >= 0) dam += pln_damage(&plp->plane, target->sct_x, target->sct_y, 's', &nukedam, 1);