]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/main.c
Clean up superfluous includes
[empserver] / src / lib / update / main.c
index 0bba4dc31e39e918db239c8fb57b5104c38c43ec..d87107a42cdc23bf50f6aa89e65834fc0f3adecd 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -41,7 +40,6 @@
 #include "empthread.h"
 #include "game.h"
 #include "journal.h"
-#include "player.h"
 #include "server.h"
 #include "unit.h"
 #include "update.h"
@@ -61,13 +59,15 @@ update_main(void)
     int n;
     int i;
     struct bp *bp;
-    int cn;
     struct natstr *np;
 
     logerror("production update (%d etus)", etu);
     getrusage(RUSAGE_SELF, &rus1);
     game_record_update(time(NULL));
     journal_update(etu);
+    /* Ensure back-to-back production reports are separate: */
+    for (n = 0; n < MAXNOC; n++)
+       clear_telegram_is_new(n);
 
     /* First, make sure all mobility is updated correctly. */
     if (opt_MOB_ACCESS) {
@@ -154,9 +154,6 @@ update_main(void)
     delete_old_announcements();
     delete_old_news();
     delete_old_lostitems();
-    /* Clear all the telegram flags */
-    for (cn = 0; cn < MAXNOC; cn++)
-       clear_telegram_is_new(cn);
     getrusage(RUSAGE_SELF, &rus2);
     logerror("End update %g user %g system",
             rus2.ru_utime.tv_sec + rus2.ru_utime.tv_usec / 1e6