/*
* 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, 1998-2000
*/
+#include <config.h>
+
#include "misc.h"
#include "player.h"
#include "xy.h"
#include "news.h"
#include "plane.h"
#include "nsc.h"
-#include "var.h"
#include "optlist.h"
#include "prototypes.h"
if (sect.sct_x == x && sect.sct_y == y)
retval = damage;
if (opt_FALLOUT) {
- if (opt_NEUTRON && (ncp->n_flags & N_NEUT))
+ if (ncp->n_flags & N_NEUT)
fallout += damage * 30;
else
fallout += damage * 3;
- sect.sct_fallout = fallout;
+ sect.sct_fallout = MIN(fallout, FALLOUT_MAX);
}
if (damage > 100) {
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x, sect.sct_y);
}
}
snxtitem_dist(&ni, EF_PLANE, x, y, rad);
- while (nxtitem(&ni, (caddr_t)&plane)) {
+ while (nxtitem(&ni, &plane)) {
/* Nukes falling on water affect only 1 sector */
if ((plane.pln_x != x) && issea)
continue;
putplane(ni.cur, &plane);
}
snxtitem_dist(&ni, EF_LAND, x, y, rad);
- while (nxtitem(&ni, (caddr_t)&land)) {
+ while (nxtitem(&ni, &land)) {
/* Nukes falling on water affect only 1 sector */
if ((land.lnd_x != x) && issea)
continue;
putland(land.lnd_uid, &land);
}
snxtitem_dist(&ni, EF_SHIP, x, y, rad);
- while (nxtitem(&ni, (caddr_t)&ship)) {
+ while (nxtitem(&ni, &ship)) {
/* Nukes falling on water affect only 1 sector */
if ((ship.shp_x != x) && issea)
continue;
putship(ship.shp_uid, &ship);
}
snxtitem_dist(&ni, EF_NUKE, x, y, rad);
- while (nxtitem(&ni, (caddr_t)&nuke)) {
+ while (nxtitem(&ni, &nuke)) {
/* Nukes falling on water affect only 1 sector */
if ((nuke.nuk_x != x) && issea)
continue;