Simplify calling of pln_arm() & friends
pln_arm(), pln_equip(), mission_pln_arm() mission_pln_equip() took a mission parameter encoding the kind of sortie (strategic bomb, pinpoint bomb, transport, ...), a flag parameter to further specify the plane's role, and a parameter ip to specify the load. The flags argument was always either P_F (intercept), P_F | P_ESC (escort), or zero (any other role). With non-zero flags, mission and ip argument were not used in any way. Use mission 'e' and null load for escorts, and remove flags. Intercept can still be identified by mission zero. Also change pln_mobcost() to take a mission parameter instead of flags, so that pln_arm() and mission_pln_arm() can simply pass on their mission.
This commit is contained in:
parent
b1dd82fa61
commit
0fe43096bc
10 changed files with 147 additions and 152 deletions
|
@ -110,12 +110,12 @@ drop(void)
|
|||
*/
|
||||
pln_arm(&bomb_list, 2 * ap_to_target,
|
||||
wantflags & P_MINE ? 'm' : 'd',
|
||||
ip, 0);
|
||||
ip);
|
||||
if (QEMPTY(&bomb_list)) {
|
||||
pr("No planes could be equipped for the mission.\n");
|
||||
return RET_FAIL;
|
||||
}
|
||||
pln_arm(&esc_list, 2 * ap_to_target, 'd', ip, P_ESC | P_F);
|
||||
pln_arm(&esc_list, 2 * ap_to_target, 'e', NULL);
|
||||
ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, 0);
|
||||
if (QEMPTY(&bomb_list)) {
|
||||
pr("No planes got through fighter defenses\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue