]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/plnsub.c
Update known contributors comments
[empserver] / src / lib / subs / plnsub.c
index 61fac77bb0d9758f3f7004e4131f3a59fdcbcd15..9467b72b0232c1b3caa5b535f831f606a63da0b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *  ---
  *
  *  plnsub.c: Plane subroutine stuff
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1986
  *     Ken Stevens, 1995
  *     Steve McClure, 1998-2000
- *     Markus Armbruster, 2004-2008
+ *     Markus Armbruster, 2004-2009
  */
 
 #include <config.h>
@@ -562,9 +562,9 @@ pln_sel(struct nstr_item *ni, struct emp_qelem *list, struct sctstr *ap,
     }
 }
 
-int
+void
 pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip,
-       int flags, int mission_flags)
+       int flags)
 {
     struct emp_qelem *qp;
     struct emp_qelem *next;
@@ -582,34 +582,11 @@ pln_arm(struct emp_qelem *list, int dist, char mission, struct ichrstr *ip,
            free(qp);
            continue;
        }
-       if (flags & (P_S | P_I)) {
-           if (plp->pcp->pl_flags & P_S)
-               mission_flags |= P_S;
-           if (plp->pcp->pl_flags & P_I)
-               mission_flags |= P_I;
-       }
-       if (!(plp->pcp->pl_flags & P_H))
-           /* no stealth on this mission */
-           mission_flags &= ~P_H;
-       if (!(plp->pcp->pl_flags & P_X))
-           /* no stealth on this mission */
-           mission_flags &= ~P_X;
-       if (!(plp->pcp->pl_flags & P_A)) {
-           /* no asw on this mission */
-           mission_flags &= ~P_A;
-           /* FIXME escorts turn ASW patrol into ordinary recon */
-       }
-       if (!(plp->pcp->pl_flags & P_MINE)) {
-           /* no asw on this mission */
-           mission_flags &= ~P_MINE;
-           /* FIXME no effect */
-       }
        pp->pln_flags |= PLN_LAUNCHED;
        pp->pln_mobil -= pln_mobcost(dist, pp, flags);
        putplane(pp->pln_uid, pp);
        pr("%s equipped\n", prplane(pp));
     }
-    return mission_flags;
 }
 
 static int
@@ -756,7 +733,6 @@ pln_put1(struct plist *plp)
 {
     struct plnstr *pp;
     struct shpstr ship;
-    struct lndstr land;
     struct sctstr sect;
 
     pp = &plp->plane;
@@ -769,15 +745,7 @@ pln_put1(struct plist *plp)
     if (!(pp->pln_flags & PLN_LAUNCHED))
        ;                       /* never took off */
     else if (pp->pln_effic < PLANE_MINEFF) {
-       /* destroyed */
-       if (pp->pln_ship >= 0) {
-           getship(pp->pln_ship, &ship);
-           take_plane_off_ship(pp, &ship);
-       }
-       if (pp->pln_land >= 0) {
-           getland(pp->pln_land, &land);
-           take_plane_off_land(pp, &land);
-       }
+       ;                       /* destroyed */
     } else if (pp->pln_ship >= 0) {
        /* It is landing on a carrier */
        getship(pp->pln_ship, &ship);
@@ -814,7 +782,7 @@ pln_put1(struct plist *plp)
  * planes.
  */
 int
-could_be_on_ship(struct plnstr *pp, struct shpstr *sp, 
+could_be_on_ship(struct plnstr *pp, struct shpstr *sp,
                 int n, int nch, int nxl, int nmsl)
 {
     struct plchrstr *pcp = &plchr[pp->pln_type];
@@ -869,16 +837,6 @@ put_plane_on_ship(struct plnstr *plane, struct shpstr *ship)
     return 1;
 }
 
-void
-take_plane_off_ship(struct plnstr *plane, struct shpstr *ship)
-{
-    if (CANT_HAPPEN(plane->pln_ship != ship->shp_uid))
-       return;
-
-    plane->pln_ship = -1;
-    putplane(plane->pln_uid, plane);
-}
-
 /*
  * Fit a plane of PP's type on land unit LP.
  * Updating the plane accordingly is the caller's job.
@@ -909,16 +867,6 @@ put_plane_on_land(struct plnstr *plane, struct lndstr *land)
     return 1;
 }
 
-void
-take_plane_off_land(struct plnstr *plane, struct lndstr *land)
-{
-    if (CANT_HAPPEN(plane->pln_land != land->lnd_uid))
-       return;
-
-    plane->pln_land = -1;
-    putplane(plane->pln_uid, plane);
-}
-
 void
 plane_sweep(struct emp_qelem *plane_list, coord x, coord y)
 {