/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2000, 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
*
* ---
*
- * 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 "nuke.h"
#include "sect.h"
#include "xy.h"
#include "nsc.h"
#include "file.h"
#include "nat.h"
-#include "deity.h"
#include "prototypes.h"
-/*ARGSUSED*/
int
-nuk_postread(int n, s_char *ptr)
+nuk_postread(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
if (np->nuk_uid != n) {
logerror("nuk_postread: Error - %d != %d, zeroing.\n", np->nuk_uid,
return 1;
}
-/*ARGSUSED*/
int
-nuk_prewrite(int n, s_char *ptr)
+nuk_prewrite(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
struct nukstr nuke;
np->ef_type = EF_NUKE;
}
void
-nuk_init(int n, s_char *ptr)
+nuk_init(int n, void *ptr)
{
- struct nukstr *np = (struct nukstr *)ptr;
+ struct nukstr *np = ptr;
np->ef_type = EF_NUKE;
np->nuk_uid = n;
ef_extend(EF_NUKE, 10);
memset(&nuke, 0, sizeof(struct nukstr));
nuke.nuk_uid = nuk_uid;
+ }
+ if (nuke.nuk_own == 0) {
nuke.nuk_ship = -1;
- nuke.nuk_n = 0;
+ nuke.nuk_x = x;
+ nuke.nuk_y = y;
+ nuke.nuk_own = own;
makenotlost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid, nuke.nuk_x,
nuke.nuk_y);
}
- nuke.nuk_x = x;
- nuke.nuk_y = y;
- nuke.nuk_own = own;
nuke.nuk_types[type] += num;
nuke.nuk_n += num;