]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/land.c
COPYING duplicates information from README. Remove. Move GPL from
[empserver] / src / lib / subs / land.c
index 1fbc81b20cf6da7b183c51617b50369d8a1d9740..2a534c0d42c6a82e76c75ea67adcd5e1673f9751 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -19,9 +19,9 @@
  *
  *  ---
  *
- *  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.
  *
  *  ---
  *
  *     Steve McClure, 1996
  */
 
+#include <config.h>
+
 #include "misc.h"
 #include "player.h"
-#include "var.h"
 #include "file.h"
 #include "land.h"
 #include "ship.h"
-#include "xy.h"
-#include "nat.h"
 #include "nsc.h"
 #include "plane.h"
 #include "prototypes.h"
 #include "optlist.h"
 
 int
-lnd_postread(int n, s_char *ptr)
+lnd_postread(int n, void *ptr)
 {
-    struct lndstr *llp = (struct lndstr *)ptr;
+    struct lndstr *llp = ptr;
     struct shpstr theship;
     struct lndstr theland;
 
@@ -109,11 +108,10 @@ lnd_postread(int n, s_char *ptr)
     return 1;
 }
 
-/*ARGSUSED*/
 int
-lnd_prewrite(int n, s_char *ptr)
+lnd_prewrite(int n, void *ptr)
 {
-    struct lndstr *llp = (struct lndstr *)ptr;
+    struct lndstr *llp = ptr;
     struct lndstr land;
     struct lndstr *lp;
     struct plnstr *pp;
@@ -155,16 +153,18 @@ lnd_prewrite(int n, s_char *ptr)
                putplane(pp->pln_uid, pp);
            }
        }
-    } else
+    } else {
+       item_prewrite(llp->lnd_item);
        getland(n, &land);
+    }
 
     return 1;
 }
 
 void
-lnd_init(int n, s_char *ptr)
+lnd_init(int n, void *ptr)
 {
-    struct lndstr *lp = (struct lndstr *)ptr;
+    struct lndstr *lp = ptr;
 
     lp->ef_type = EF_LAND;
     lp->lnd_uid = n;