]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/fly.c
Update copyright notice
[empserver] / src / lib / commands / fly.c
index bc5c445b7ce6e61e4cb6c52b6efb59a8d5b67381..5351d25d969aeee90d032b55318827fb6e0d2985 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -94,16 +94,10 @@ fly(void)
     /*
      * select planes within range
      */
-    pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target,
-           1, wantflags, P_M | P_O);
-    if (QEMPTY(&bomb_list)) {
-       pr("No planes could be equipped for the mission.\n");
-       return RET_FAIL;
-    }
-    wantflags |= P_F;
-    wantflags |= P_ESC;
-    pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target,
-           1, wantflags, P_M | P_O);
+    pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target, 1,
+           wantflags, P_M | P_O);
+    pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target, 1,
+           wantflags | P_ESC | P_F, P_M | P_O);
     if (cno >= 0 && !pln_oneway_to_carrier_ok(&bomb_list, &esc_list, cno)) {
        pr("Not enough room on ship #%d!\n", cno);
        return RET_FAIL;
@@ -111,12 +105,12 @@ fly(void)
     /*
      * now arm and equip the bombers, transports, whatever.
      */
-    pln_arm(&bomb_list, ap_to_target, 't', ip, 0);
+    pln_arm(&bomb_list, ap_to_target, 't', ip);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
-    pln_arm(&esc_list, ap_to_target, 't', ip, P_ESC | P_F);
+    pln_arm(&esc_list, 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");