]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/age.c
Fix trailing whitespace
[empserver] / src / lib / update / age.c
index 37e19933b23deb1629fa97c22456e7ca53920ef6..7f34f1537a7f2d8c1926a7998c90b8e23203f917 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, 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
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
  *  age.c: Age people
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare, 1986
  */
 
-#include "misc.h"
-#include "nat.h"
-#include "file.h"
+#include <config.h>
+
 #include "update.h"
-#include "gen.h"
-#include "optlist.h"
 
 void
 age_levels(int etu)
 {
-    register float best_tech;
-    register float best_res;
-    register struct natstr *np;
+    float best_tech, best_res;
+    struct natstr *np;
     int i;
     double level;
     double delta;
@@ -52,13 +48,7 @@ age_levels(int etu)
     best_tech = 0.0;
     best_res = 0.0;
     for (i = 0; NULL != (np = getnatp(i)); i++) {
-       if ((np->nat_stat & STAT_NORM) == 0)
-           continue;
-
-       if (np->nat_stat & STAT_GOD)
-           continue;
-
-       if (np->nat_stat == VIS)
+       if (np->nat_stat != STAT_ACTIVE)
            continue;
 
        if (best_tech < np->nat_level[NAT_TLEV])
@@ -83,11 +73,7 @@ age_levels(int etu)
     best_tech /= 5;
     best_res /= 5;
     for (i = 0; NULL != (np = getnatp(i)); i++) {
-       if ((np->nat_stat & STAT_INUSE) == 0)
-           continue;
-       if (np->nat_stat & STAT_GOD)
-           continue;
-       if (np->nat_stat == VIS)
+       if (np->nat_stat < STAT_SANCT || np->nat_stat == STAT_GOD)
            continue;
        level = np->nat_level[NAT_TLEV];
        if (level < best_tech && chance(0.2))