]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/land.c
Update copyright notice
[empserver] / src / lib / subs / land.c
index fccf0ff17861e0675a55d1517e14f14373b2e324..034393a52e3dc04998c2fb07ce9952aa017fe7cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2018, 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:
  *     Steve McClure, 1996
- *     Markus Armbruster, 2004-2011
+ *     Markus Armbruster, 2004-2016
  */
 
 #include <config.h>
 
-#include "file.h"
 #include "land.h"
 #include "lost.h"
 #include "misc.h"
@@ -41,6 +40,7 @@
 #include "player.h"
 #include "prototypes.h"
 #include "unit.h"
+#include "update.h"
 
 void
 lnd_postread(int n, void *ptr)
@@ -53,9 +53,10 @@ lnd_postread(int n, void *ptr)
        memset(lp, 0, sizeof(struct lndstr));
     }
 
-    if (opt_MOB_ACCESS)
-       lnd_do_upd_mob(lp);
     player->owner = (player->god || lp->lnd_own == player->cnum);
+
+    if (opt_MOB_ACCESS && lp->lnd_own && !update_running)
+       mob_inc_land(lp, game_tick_to_now(&lp->lnd_access));
 }
 
 void