]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/reco.c
Update copyright notice
[empserver] / src / lib / commands / reco.c
index e27031cfe929cfed366565e531618220d7583ba3..d42f3740ea444f20d1029f0b8bbe00b6e342a578 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2017, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -63,8 +63,7 @@ reco(void)
        return RET_SYN;
     ax = ap_sect.sct_x;
     ay = ap_sect.sct_y;
-    if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)
-       || *flightpath == 0)
+    if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY))
        return RET_SYN;
     tx = ax;
     ty = ay;
@@ -76,8 +75,6 @@ reco(void)
     cno = target.gen.ef_type == EF_SHIP ? target.gen.uid : -1;
 
     ap_to_target = strlen(flightpath);
-    if (flightpath[ap_to_target - 1] == 'h')
-       ap_to_target--;
     pr("range to target is %d\n", ap_to_target);
     /*
      * select planes within range
@@ -87,7 +84,8 @@ reco(void)
            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)) {
+    if (cno >= 0
+       && !pln_can_land_on_carrier(&bomb_list, &esc_list, &target.ship)) {
        pr("Not enough room on ship #%d!\n", cno);
        return RET_FAIL;
     }