/*
* 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
*
* ---
*
- * 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.
*
* ---
*
*
*/
+#include <config.h>
+
#include "misc.h"
#include "player.h"
#include "sect.h"
if (sect.sct_own != sp->shp_own) {
ally_cash = cash * trade_ally_cut;
- cash *= (1.0 + trade_ally_bonus);\r
+ cash *= (1.0 + trade_ally_bonus);
}
}
if (!confirm(y_or_n))
return RET_FAIL;
}
- while (nxtitem(&ni, (s_char *)&item)) {
+ while (nxtitem(&ni, &item)) {
if (!player->owner)
continue;
if (opt_MARKET) {
makelost(EF_PLANE, item.plane.pln_own, item.plane.pln_uid,
item.plane.pln_x, item.plane.pln_y);
item.plane.pln_own = 0;
- putplane(item.plane.pln_uid, (s_char *)&item.plane);
+ putplane(item.plane.pln_uid, &item.plane);
}
pr(" scuttled in %s\n",
xyas(item.ship.shp_x, item.ship.shp_y, player->cnum));
getsect(sp->shp_x, sp->shp_y, §);
snxtitem_all(&ni, EF_PLANE);
- while (nxtitem(&ni, (s_char *)&plane)) {
+ while (nxtitem(&ni, &plane)) {
if (plane.pln_own == 0)
continue;
if (plane.pln_ship == sp->shp_uid) {
plane.pln_uid, sp->shp_uid,
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
}
- putplane(plane.pln_uid, (s_char *)&plane);
+ putplane(plane.pln_uid, &plane);
}
}
snxtitem_all(&ni, EF_LAND);
- while (nxtitem(&ni, (s_char *)&land)) {
+ while (nxtitem(&ni, &land)) {
if (land.lnd_own == 0)
continue;
if (land.lnd_ship == sp->shp_uid) {
"Land unit %d transferred off ship %d to %s\n",
land.lnd_uid, sp->shp_uid,
xyas(land.lnd_x, land.lnd_y, land.lnd_own));
- putland(land.lnd_uid, (s_char *)&land);
+ putland(land.lnd_uid, &land);
} else
scuttle_land(&land);
}
getsect(lp->lnd_x, lp->lnd_y, §);
snxtitem_all(&ni, EF_PLANE);
- while (nxtitem(&ni, (s_char *)&plane)) {
+ while (nxtitem(&ni, &plane)) {
if (plane.pln_own == 0)
continue;
if (plane.pln_land == lp->lnd_uid) {
plane.pln_uid, lp->lnd_uid,
xyas(plane.pln_x, plane.pln_y, plane.pln_own));
}
- putplane(plane.pln_uid, (s_char *)&plane);
+ putplane(plane.pln_uid, &plane);
}
}
snxtitem_all(&ni, EF_LAND);
- while (nxtitem(&ni, (s_char *)&land)) {
+ while (nxtitem(&ni, &land)) {
if (land.lnd_own == 0)
continue;
if (land.lnd_land == lp->lnd_uid) {
"Land unit %d transferred off unit %d to %s\n",
land.lnd_uid, lp->lnd_uid,
xyas(land.lnd_x, land.lnd_y, land.lnd_own));
- putland(land.lnd_uid, (s_char *)&land);
+ putland(land.lnd_uid, &land);
} else
scuttle_land(&land);
}