]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/plane.c
Fix trailing whitespace
[empserver] / src / lib / update / plane.c
index 82e2d91b9edfa101efcd1146f0dbe565aecf0257..c4a5369841e26e913c95de8015641b1313804383 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *  ---
  *
  *  plane.c: Do production for planes
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1986
  *     Steve McClure, 1998
- *     Markus Armbruster, 2006
+ *     Markus Armbruster, 2006-2008
  */
 
 #include <config.h>
@@ -66,7 +66,7 @@ prod_plane(int etus, int natnum, struct bp *bp, int buildem)
            continue;
        }
 
-       if (pp->pln_flags & PLN_LAUNCHED) {
+       if (pln_is_in_orbit(pp)) {
            if (!player->simulation && buildem == 0
                && !(pp->pln_flags & PLN_SYNCHRONOUS))
                move_sat(pp);
@@ -168,7 +168,7 @@ planerepair(struct plnstr *pp, struct natstr *np, struct bp *bp, int etus)
     if (!player->simulation)
        avail = sp->sct_avail * 100;
     else
-       avail = gt_bg_nmbr(bp, sp, I_MAX + 1) * 100;
+       avail = bp_get_avail(bp, sp) * 100;
     if (carrier)
        avail += etus * carrier->shp_item[I_MILIT] / 2;
 
@@ -198,14 +198,14 @@ planerepair(struct plnstr *pp, struct natstr *np, struct bp *bp, int etus)
     if (!player->simulation)
        avail = (sp->sct_avail * 100 - used) / 100;
     else
-       avail = (gt_bg_nmbr(bp, sp, I_MAX + 1) * 100 - used) / 100;
+       avail = (bp_get_avail(bp, sp) * 100 - used) / 100;
 
     if (avail < 0)
        avail = 0;
     if (!player->simulation)
        sp->sct_avail = avail;
     else
-       pt_bg_nmbr(bp, sp, I_MAX + 1, avail);
+       bp_put_avail(bp, sp, avail);
 
     if (sp->sct_type != SCT_AIRPT)
        build /= 3;