]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/plnsub.c
Update copyright notice
[empserver] / src / lib / subs / plnsub.c
index c0e0816eeca84de3508837e929debc4638902f09..9cf9c4718df4c677d2f0bcf6ea7a1af9893c5f25 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
 #include "file.h"
 #include "item.h"
 #include "land.h"
-#include "lost.h"
 #include "map.h"
 #include "misc.h"
 #include "nat.h"
 #include "nsc.h"
 #include "nuke.h"
 #include "optlist.h"
-#include "path.h"
 #include "plane.h"
 #include "player.h"
 #include "prototypes.h"
@@ -538,7 +536,7 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
         * much of the code assumes that only the plane's owner can
         * fly it.
         */
-       if (plane.pln_own != player->cnum)
+       if (!plane.pln_own || plane.pln_own != player->cnum)
            continue;
        if (plane.pln_mobil <= 0)
            continue;
@@ -720,7 +718,10 @@ pln_equip(struct plist *plp, struct ichrstr *ip, char mission)
                                         plp->plane.pln_y,
                                         I_SHELL, needed);
 #endif
-       abandon_needed = !!would_abandon(&sect, itype, needed, NULL);
+       if (pp->pln_ship >= 0 || pp->pln_land >= 0)
+           abandon_needed = 0;
+       else
+           abandon_needed = !!would_abandon(&sect, itype, needed, NULL);
        if (item[itype] < needed + abandon_needed) {
            pr("Not enough %s for %s\n", ichr[itype].i_name, prplane(pp));
            return -1;