]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/plane.c
Update copyright notice
[empserver] / src / lib / subs / plane.c
index e0976d4b4b3dc0041632b71d51dc6e4e313736bc..eed46fc6644602bf33eb29a970084921a9c17818 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2017, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
  *  Known contributors to this file:
  *     Dave Pare, 1989
  *     Steve McClure, 1996
- *     Markus Armbruster, 2006-2011
+ *     Markus Armbruster, 2006-2016
  */
 
 #include <config.h>
 
-#include "file.h"
 #include "lost.h"
 #include "misc.h"
 #include "optlist.h"
@@ -42,6 +41,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "unit.h"
+#include "update.h"
 
 void
 pln_postread(int n, void *ptr)
@@ -53,9 +53,11 @@ pln_postread(int n, void *ptr)
                 pp->pln_uid, n);
        memset(pp, 0, sizeof(struct plnstr));
     }
+
     player->owner = (player->god || pp->pln_own == player->cnum);
-    if (opt_MOB_ACCESS)
-       pln_do_upd_mob(pp);
+
+    if (opt_MOB_ACCESS && pp->pln_own && !update_running)
+       mob_inc_plane(pp, game_tick_to_now(&pp->pln_access));
 }
 
 void