Simplify plane selection for drop, fly, recon and sweep

Plane flying commands first select the planes to fly the mission and
their escorts, then equip them.  They all fail when no planes to fly
the mission can be equipped.

Unlike bomb and paradrop, commands drop, fly, recon and sweep had an
additional check that made them fail when no planes to fly the mission
could be selected.  Because "none selected" implies "none equipped",
the additional check is redundant.  Remove it.

While there, break lines in calls of pln_sel() more tastefully.
This commit is contained in:
Markus Armbruster 2009-09-27 15:07:57 -04:00
parent fd4da5aab3
commit 29a6baca6d
5 changed files with 21 additions and 32 deletions

View file

@ -126,10 +126,10 @@ bomb(void)
/*
* select planes within range
*/
pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target,
2, P_B | P_T, P_M | P_O);
pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target,
2, P_ESC | P_F, P_M | P_O);
pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target, 2,
P_B | P_T, P_M | P_O);
pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target, 2,
P_ESC | P_F, P_M | P_O);
/*
* now arm and equip the bombers, transports, whatever.
*/