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.
This commit is contained in:
parent
7b7fe69c46
commit
221027aca5
1 changed files with 0 additions and 12 deletions
|
@ -344,8 +344,6 @@ eff_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
if (changed_plane_aborts(plp))
|
if (changed_plane_aborts(plp))
|
||||||
continue;
|
continue;
|
||||||
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
|
|
||||||
continue;
|
|
||||||
if (plp->bombs || nuk_on_plane(&plp->plane) >= 0)
|
if (plp->bombs || nuk_on_plane(&plp->plane) >= 0)
|
||||||
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
||||||
'p', &nukedam, 1);
|
'p', &nukedam, 1);
|
||||||
|
@ -424,8 +422,6 @@ comm_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
if (changed_plane_aborts(plp))
|
if (changed_plane_aborts(plp))
|
||||||
continue;
|
continue;
|
||||||
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
|
|
||||||
continue;
|
|
||||||
if (plp->bombs || nuk_on_plane(&plp->plane) >= 0)
|
if (plp->bombs || nuk_on_plane(&plp->plane) >= 0)
|
||||||
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
||||||
'p', &nukedam, 1);
|
'p', &nukedam, 1);
|
||||||
|
@ -478,8 +474,6 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
if (changed_plane_aborts(plp))
|
if (changed_plane_aborts(plp))
|
||||||
continue;
|
continue;
|
||||||
if ((plp->pcp->pl_flags & P_C) && (!(plp->pcp->pl_flags & P_T)))
|
|
||||||
continue;
|
|
||||||
if (plp->pcp->pl_flags & P_A)
|
if (plp->pcp->pl_flags & P_A)
|
||||||
nships = asw_shipsatxy(target->sct_x, target->sct_y, 0, 0,
|
nships = asw_shipsatxy(target->sct_x, target->sct_y, 0, 0,
|
||||||
&plp->plane, &head);
|
&plp->plane, &head);
|
||||||
|
@ -605,8 +599,6 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
|
||||||
plp = (struct plist *)qp;
|
plp = (struct plist *)qp;
|
||||||
if (changed_plane_aborts(plp))
|
if (changed_plane_aborts(plp))
|
||||||
continue;
|
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);
|
nplanes = planesatxy(target->sct_x, target->sct_y, 0, 0);
|
||||||
if (nplanes == 0) {
|
if (nplanes == 0) {
|
||||||
pr("%s could not find any planes!\n", prplane(&plp->plane));
|
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;
|
plp = (struct plist *)qp;
|
||||||
if (changed_plane_aborts(plp))
|
if (changed_plane_aborts(plp))
|
||||||
continue;
|
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);
|
nunits = unitsatxy(target->sct_x, target->sct_y, 0, 0);
|
||||||
if (nunits == 0) {
|
if (nunits == 0) {
|
||||||
pr("%s could not find any units!\n", prplane(&plp->plane));
|
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) {
|
for (qp = list->q_forw; qp != list; qp = qp->q_forw) {
|
||||||
plp = (struct plist *)qp;
|
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)
|
if (plp->bombs || nuk_on_plane(&plp->plane) >= 0)
|
||||||
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
dam += pln_damage(&plp->plane, target->sct_x, target->sct_y,
|
||||||
's', &nukedam, 1);
|
's', &nukedam, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue