]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/main.c
Update copyright notice.
[empserver] / src / lib / update / main.c
index a5abb88df2ed55eab294329a76798b3741cae936..5d79042d19f7b1910ad21663fd52be791524e413 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -66,6 +66,9 @@ update_main(void *unused)
     if (CANT_HAPPEN(!update_pending))
         update_pending = 1;
 
+    logerror("production update (%d etus)", etu);
+    journal_update(etu);
+
     /* First, make sure all mobility is updated correctly. */
     if (opt_MOB_ACCESS) {
        mob_ship(etu);
@@ -76,13 +79,15 @@ update_main(void *unused)
     player->proc = empth_self();
     player->cnum = 0;
     player->god = 1;
+
+    if (opt_AUTO_POWER)
+       update_power();
+
     /*
      * set up all the variables which get used in the
      * sector production routine (for producing education,
      * happiness, and printing out the state of the nation)
      */
-    logerror("production update (%d etus)", etu);
-    journal_update(etu);
     memset(pops, 0, sizeof(pops));
     memset(air_money, 0, sizeof(air_money));
     memset(sea_money, 0, sizeof(sea_money));