]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/mission.c
Update known contributors comments
[empserver] / src / lib / subs / mission.c
index 5c7d3cd0de3f6cd6842111ed8307093a056784f3..586300a0a17eeb80133598f21774ff936ec0a582 100644 (file)
@@ -30,6 +30,7 @@
  *  Known contributors to this file:
  *     Ken Stevens, 1995
  *     Steve McClure, 1996-2000
+ *     Markus Armbruster, 2003-2009
  */
 
 #include <config.h>
@@ -939,11 +940,14 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags,
        if (itype != I_NONE && needed <= 0)
            return -1;
        if (itype != I_NONE) {
-           if (itype == I_SHELL && item[itype] < needed)
-               item[itype] += supply_commod(plp->plane.pln_own,
-                                            plp->plane.pln_x,
-                                            plp->plane.pln_y,
-                                            I_SHELL, needed);
+           if (itype == I_SHELL && item[itype] < needed) {
+               if (pp->pln_ship >= 0)
+                   shp_supply(&ship, I_SHELL, needed);
+               else if (pp->pln_land >= 0)
+                   lnd_supply(&land, I_SHELL, needed);
+               else
+                   sct_supply(&sect, I_SHELL, needed);
+           }
            if (item[itype] < needed)
                return -1;
            item[itype] -= needed;