]> git.pond.sub.org Git - empserver/commitdiff
Remove take_plane_off_ship(), take_plane_off_land()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 14:02:17 +0000 (10:02 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 14:21:27 +0000 (10:21 -0400)
Commit 3e370da5 left them pretty trivial.  Inline, simplify, remove.

include/prototypes.h
src/lib/commands/load.c
src/lib/subs/plnsub.c

index cfcce83c11ff25ecaaff7401e7f4045550cc0446..f7c79bee0b093863ff585fa35145572b327f7273 100644 (file)
@@ -556,8 +556,6 @@ extern int pln_arm(struct emp_qelem *, int, char, struct ichrstr *,
 extern int pln_mobcost(int, struct plnstr *, int);
 extern void pln_put(struct emp_qelem *);
 extern void pln_put1(struct plist *);
-extern void take_plane_off_ship(struct plnstr *, struct shpstr *);
-extern void take_plane_off_land(struct plnstr *, struct lndstr *);
 extern void plane_sweep(struct emp_qelem *, coord, coord);
 extern int put_plane_on_land(struct plnstr *, struct lndstr *);
 extern int pln_hitchance(struct plnstr *, int, int);
index 8bdb1091fc080add16b928405f7702aabd3f05cb..92bf22646f0004e04071544dc06f760dbd3c736a 100644 (file)
@@ -444,7 +444,7 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
            pln.pln_mission = 0;
            putplane(pln.pln_uid, &pln);
        } else {
-           take_plane_off_ship(&pln, sp);
+           pln.pln_ship = -1;
            sprintf(buf, "unloaded in your %s at %s",
                    dchr[sectp->sct_type].d_name,
                    xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
@@ -823,7 +823,7 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
            gift(lp->lnd_own, player->cnum, &pln, buf);
            putplane(pln.pln_uid, &pln);
        } else {
-           take_plane_off_land(&pln, lp);
+           pln.pln_land = -1;
            sprintf(buf, "unloaded at your sector at %s",
                    xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
            gift(sectp->sct_own, player->cnum, &pln, buf);
index 45eb43714a089a7003122542461ce98d2fb5cf7e..e0aaa1e64afd41cd7e29ad9c38d783d7fa147dc5 100644 (file)
@@ -860,16 +860,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.
@@ -900,16 +890,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)
 {