]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/load.c
Rearrange uses of getrel() slightly
[empserver] / src / lib / commands / load.c
index 1c5f50e92b02d7582debfff01f602f5bbeaf0f3d..4e46212a98cca224b17edd63bc483b05a4f041be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -50,8 +50,8 @@
 /*
  * The values 1 and -1 are important below, don't change them.
  */
-#define        LOAD    1
-#define        UNLOAD  -1
+#define LOAD   1
+#define UNLOAD -1
 
 static int load_plane_ship(struct sctstr *sectp, struct shpstr *sp,
                           int noisy, int load_unload, int *nshipsp);
@@ -143,7 +143,8 @@ load(void)
                   xyas(sect.sct_x, sect.sct_y, player->cnum));
            continue;
        }
-       if (!player->owner && load_unload == UNLOAD
+       if (load_unload == UNLOAD
+           && !player->owner
            && getrel(getnatp(sect.sct_own), player->cnum) < FRIENDLY) {
            if (noisy)
                pr("You can't unload into an unfriendly %s\n",
@@ -319,7 +320,7 @@ lload(void)
 
 static int
 move_amount(int sect_amt, int unit_amt, int unit_max,
-           int load_unload, int amount)
+          int load_unload, int amount)
 {
     int move_amt;
 
@@ -641,11 +642,11 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
            land.lnd_harden = 0;
            putland(land.lnd_uid, &land);
 #if 0
-           /*
-            * FIXME if this supplies from the sector, the putsect in
-            * load() / lload() duplicates those supplies, causing a
-            * seqno mismatch
-            */
+          /*
+           * FIXME if this supplies from the sector, the putsect in
+           * load() / lload() duplicates those supplies, causing a
+           * seqno mismatch
+           */
            if (!lnd_supply_all(&land))
                pr("WARNING: %s is out of supply!\n", prland(&land));
 #else
@@ -995,7 +996,7 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
            land.lnd_harden = 0;
            putland(land.lnd_uid, &land);
 #if 0
-           /* FIXME same issue as in load_land_ship() */
+          /* FIXME same issue as in load_land_ship() */
            if (!lnd_supply_all(&land))
                pr("WARNING: %s is out of supply!\n", prland(&land));
 #else