All callers pass non-zero. Simplify accordingly.
extern int supply_commod(int, int, int, i_type, int);
extern int has_supply(struct lndstr *);
/* takeover.c */
extern int supply_commod(int, int, int, i_type, int);
extern int has_supply(struct lndstr *);
/* takeover.c */
-extern void takeover_land(struct lndstr *, natid, int);
+extern void takeover_land(struct lndstr *, natid);
extern void takeover(struct sctstr *, natid);
extern void takeover(struct sctstr *, natid);
-extern void takeover_ship(struct shpstr *, natid, int);
+extern void takeover_ship(struct shpstr *, natid);
extern void takeover_plane(struct plnstr *, natid);
/* trdsub.c */
/* trechk.c */
extern void takeover_plane(struct plnstr *, natid);
/* trdsub.c */
/* trechk.c */
putsect(§);
} else if (def->type == EF_SHIP) {
getship(def->shp_uid, &ship);
putsect(§);
} else if (def->type == EF_SHIP) {
getship(def->shp_uid, &ship);
- takeover_ship(&ship, player->cnum, 1);
+ takeover_ship(&ship, player->cnum);
putship(ship.shp_uid, &ship);
} else if (def->type == EF_LAND) {
getland(def->lnd_uid, &land);
putship(ship.shp_uid, &ship);
} else if (def->type == EF_LAND) {
getland(def->lnd_uid, &land);
- takeover_land(&land, player->cnum, 1);
+ takeover_land(&land, player->cnum);
putland(land.lnd_uid, &land);
}
if (delete_me)
putland(land.lnd_uid, &land);
}
if (delete_me)
prland(lp),
cname(newown), xyas(lp->lnd_x, lp->lnd_y, lp->lnd_own));
}
prland(lp),
cname(newown), xyas(lp->lnd_x, lp->lnd_y, lp->lnd_own));
}
- takeover_land(lp, newown, 1);
+ takeover_land(lp, newown);
-takeover_ship(struct shpstr *sp, natid newown, int hostile)
+takeover_ship(struct shpstr *sp, natid newown)
{
struct plnstr *pp;
struct lndstr *lp;
{
struct plnstr *pp;
struct lndstr *lp;
/* Take over planes */
snxtitem_cargo(&ni, EF_PLANE, EF_SHIP, sp->shp_uid);
while (nxtitem(&ni, pp)) {
/* Take over planes */
snxtitem_cargo(&ni, EF_PLANE, EF_SHIP, sp->shp_uid);
while (nxtitem(&ni, pp)) {
- if (hostile) {
- if (pp->pln_effic > PLANE_MINEFF)
- pp->pln_effic = PLANE_MINEFF;
- }
+ if (pp->pln_effic > PLANE_MINEFF)
+ pp->pln_effic = PLANE_MINEFF;
pp->pln_mobil = 0;
if (opt_MOB_ACCESS)
game_tick_to_now(&pp->pln_access);
pp->pln_mobil = 0;
if (opt_MOB_ACCESS)
game_tick_to_now(&pp->pln_access);
/* Take over land units */
snxtitem_cargo(&ni, EF_LAND, EF_SHIP, sp->shp_uid);
while (nxtitem(&ni, lp))
/* Take over land units */
snxtitem_cargo(&ni, EF_LAND, EF_SHIP, sp->shp_uid);
while (nxtitem(&ni, lp))
- takeover_land(lp, newown, hostile);
+ takeover_land(lp, newown);
putship(sp->shp_uid, sp);
}
void
putship(sp->shp_uid, sp);
}
void
-takeover_land(struct lndstr *landp, natid newown, int hostile)
+takeover_land(struct lndstr *landp, natid newown)
{
struct plnstr *pp;
struct lndstr *lp;
{
struct plnstr *pp;
struct lndstr *lp;
/* Take over planes */
snxtitem_cargo(&ni, EF_PLANE, EF_LAND, landp->lnd_uid);
while (nxtitem(&ni, pp)) {
/* Take over planes */
snxtitem_cargo(&ni, EF_PLANE, EF_LAND, landp->lnd_uid);
while (nxtitem(&ni, pp)) {
- if (hostile) {
- if (pp->pln_effic > PLANE_MINEFF)
- pp->pln_effic = PLANE_MINEFF;
- }
+ if (pp->pln_effic > PLANE_MINEFF)
+ pp->pln_effic = PLANE_MINEFF;
pp->pln_mobil = 0;
if (opt_MOB_ACCESS)
game_tick_to_now(&pp->pln_access);
pp->pln_mobil = 0;
if (opt_MOB_ACCESS)
game_tick_to_now(&pp->pln_access);
/* Take over land units */
snxtitem_cargo(&ni, EF_LAND, EF_LAND, landp->lnd_uid);
while (nxtitem(&ni, lp))
/* Take over land units */
snxtitem_cargo(&ni, EF_LAND, EF_LAND, landp->lnd_uid);
while (nxtitem(&ni, lp))
- takeover_land(lp, newown, hostile);
+ takeover_land(lp, newown);
putland(landp->lnd_uid, landp);
}
putland(landp->lnd_uid, landp);
}