Break lines more tastefully.

This commit is contained in:
Markus Armbruster 2006-05-14 07:52:20 +00:00
parent fcc0162188
commit 5b4b3a13cb
40 changed files with 220 additions and 229 deletions

View file

@ -167,8 +167,8 @@ extern int as_search(struct as_data *adp);
extern void as_delete(struct as_data *adp);
extern void as_reset(struct as_data *adp);
extern void as_stats(struct as_data *adp, FILE * fp);
extern struct as_path *as_find_cachepath(coord fx,
coord fy, coord tx, coord ty);
extern struct as_path *as_find_cachepath(coord fx, coord fy,
coord tx, coord ty);
/* Functions that are "private" to algorithm */

View file

@ -137,8 +137,8 @@ add(void)
snxtitem_all(&ni, EF_LAND);
while (nxtitem(&ni, &land)) {
if (land.lnd_own == coun) {
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = 0;
pr("Land unit %d wiped\n", land.lnd_uid);
putland(land.lnd_uid, &land);

View file

@ -146,10 +146,10 @@ anti(void)
sect.sct_item[I_MILIT] = ache;
if (sect.sct_own == sect.sct_oldown)
sect.sct_oldown = 0;
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x,
sect.sct_y);
makenotlost(EF_SECTOR, sect.sct_oldown, 0, sect.sct_x,
sect.sct_y);
makelost(EF_SECTOR, sect.sct_own, 0,
sect.sct_x, sect.sct_y);
makenotlost(EF_SECTOR, sect.sct_oldown, 0,
sect.sct_x, sect.sct_y);
sect.sct_own = sect.sct_oldown;
sect.sct_off = 1; /* Turn the sector off */
putsect(&sect);

View file

@ -545,8 +545,8 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
if (gun > 0) {
shell = ship.shp_item[I_SHELL];
if (shell <= 0)
shell = supply_commod(ship.shp_own, ship.shp_x,
ship.shp_y, I_SHELL, 1);
shell = supply_commod(ship.shp_own,
ship.shp_x, ship.shp_y, I_SHELL, 1);
}
mcp = &mchr[(int)ship.shp_type];
if (gun > 0 && shell > 0 && !(mcp->m_flags & M_SUB)) {
@ -694,8 +694,8 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
own = plane.pln_own;
if (dam > plane.pln_effic) {
plane.pln_effic = 0;
makelost(EF_PLANE, plane.pln_own, plane.pln_uid, plane.pln_x,
plane.pln_y);
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
plane.pln_x, plane.pln_y);
plane.pln_own = 0;
} else
plane.pln_effic -= dam;

View file

@ -390,8 +390,8 @@ build_ship(struct sctstr *sp, struct mchrstr *mp, short *vec, int tlev)
if (sp->sct_pstage == PLG_INFECT)
ship.shp_pstage = PLG_EXPOSED;
makenotlost(EF_SHIP, ship.shp_own, ship.shp_uid, ship.shp_x,
ship.shp_y);
makenotlost(EF_SHIP, ship.shp_own, ship.shp_uid,
ship.shp_x, ship.shp_y);
putship(ship.shp_uid, &ship);
pr("%s", prship(&ship));
pr(" built in sector %s\n", xyas(sp->sct_x, sp->sct_y, player->cnum));
@ -516,8 +516,8 @@ build_land(struct sctstr *sp, struct lchrstr *lp, short *vec, int tlev)
if (sp->sct_pstage == PLG_INFECT)
land.lnd_pstage = PLG_EXPOSED;
putland(nstr.cur, &land);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
pr("%s", prland(&land));
pr(" built in sector %s\n", xyas(sp->sct_x, sp->sct_y, player->cnum));
return 1;
@ -807,8 +807,8 @@ build_plane(struct sctstr *sp, struct plchrstr *pp, short *vec, int tlev)
vec[I_HCM] -= hcm;
vec[I_MILIT] -= mil;
makenotlost(EF_PLANE, plane.pln_own, plane.pln_uid, plane.pln_x,
plane.pln_y);
makenotlost(EF_PLANE, plane.pln_own, plane.pln_uid,
plane.pln_x, plane.pln_y);
putplane(plane.pln_uid, &plane);
pr("%s built in sector %s\n", prplane(&plane),
xyas(sp->sct_x, sp->sct_y, player->cnum));

View file

@ -218,8 +218,8 @@ grab_sect(struct sctstr *sp, natid to)
prplane(pp), cname(player->cnum));
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = to;
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_mobil = 0;
pp->pln_mission = 0;
putplane(pp->pln_uid, pp);
@ -235,8 +235,8 @@ grab_sect(struct sctstr *sp, natid to)
prnuke(np), cname(player->cnum));
makelost(EF_NUKE, np->nuk_own, np->nuk_uid, np->nuk_x, np->nuk_y);
np->nuk_own = to;
makenotlost(EF_NUKE, np->nuk_own, np->nuk_uid, np->nuk_x,
np->nuk_y);
makenotlost(EF_NUKE, np->nuk_own, np->nuk_uid,
np->nuk_x, np->nuk_y);
putnuke(ni.cur, np);
}
@ -347,8 +347,8 @@ grab_ship(struct shpstr *sp, natid to)
prplane(pp), cname(player->cnum));
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = to;
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_mobil = 0;
pp->pln_mission = 0;
putplane(pp->pln_uid, pp);

View file

@ -483,13 +483,11 @@ doland(char op, int arg, char *p, struct sctstr *sect)
xyas(sect->sct_x, sect->sct_y, player->cnum),
cname(sect->sct_own), sect->sct_own, cname(newown), newown);
if (sect->sct_own) {
makelost(EF_SECTOR, sect->sct_own, 0, sect->sct_x,
sect->sct_y);
makelost(EF_SECTOR, sect->sct_own, 0,
sect->sct_x, sect->sct_y);
wu(player->cnum, sect->sct_own,
"Sector %s lost to deity intervention\n", xyas(sect->sct_x,
sect->sct_y,
sect->
sct_own));
"Sector %s lost to deity intervention\n",
xyas(sect->sct_x, sect->sct_y, sect->sct_own));
}
benefit(sect->sct_own, 0);
sect->sct_own = newown;
@ -808,15 +806,15 @@ doship(char op, int arg, char *p, struct shpstr *ship)
if (arg && arg < MAXNOC) {
wu(player->cnum, (natid)arg,
"%s given to you by deity intervention!\n", prship(ship));
makelost(EF_SHIP, ship->shp_own, ship->shp_uid, ship->shp_x,
ship->shp_y);
makelost(EF_SHIP, ship->shp_own, ship->shp_uid,
ship->shp_x, ship->shp_y);
ship->shp_own = (natid)arg;
makenotlost(EF_SHIP, ship->shp_own, ship->shp_uid, ship->shp_x,
ship->shp_y);
makenotlost(EF_SHIP, ship->shp_own, ship->shp_uid,
ship->shp_x, ship->shp_y);
} else if (!arg) {
ship->shp_effic = 0;
makelost(EF_SHIP, ship->shp_own, ship->shp_uid, ship->shp_x,
ship->shp_y);
makelost(EF_SHIP, ship->shp_own, ship->shp_uid,
ship->shp_x, ship->shp_y);
ship->shp_own = (natid)0;
}
break;
@ -925,14 +923,14 @@ dounit(char op, int arg, char *p, struct lndstr *land)
if (arg && arg < MAXNOC) {
wu(player->cnum, (natid)arg,
"%s given to you by deity intervention!\n", prland(land));
makelost(EF_LAND, land->lnd_own, land->lnd_uid, land->lnd_x,
land->lnd_y);
makelost(EF_LAND, land->lnd_own, land->lnd_uid,
land->lnd_x, land->lnd_y);
land->lnd_own = (natid)arg;
makenotlost(EF_LAND, land->lnd_own, land->lnd_uid, land->lnd_x,
land->lnd_y);
makenotlost(EF_LAND, land->lnd_own, land->lnd_uid,
land->lnd_x, land->lnd_y);
} else if (!arg) {
makelost(EF_LAND, land->lnd_own, land->lnd_uid, land->lnd_x,
land->lnd_y);
makelost(EF_LAND, land->lnd_own, land->lnd_uid,
land->lnd_x, land->lnd_y);
land->lnd_effic = 0;
land->lnd_own = (natid)0;
}

View file

@ -139,8 +139,8 @@ fuel(void)
if (sect.sct_effic < 2) {
pr("The harbor at %s is not 2%% efficient yet.\n",
xyas(item.ship.shp_x,
item.ship.shp_y, player->cnum));
xyas(item.ship.shp_x, item.ship.shp_y,
player->cnum));
harbor = 0;
}
if ((sect.sct_own != player->cnum) && sect.sct_own)

View file

@ -159,8 +159,8 @@ laun(void)
if (retval != RET_OK)
return retval;
if (gone) {
makelost(EF_PLANE, plane.pln_own, plane.pln_uid, plane.pln_x,
plane.pln_y);
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
plane.pln_x, plane.pln_y);
plane.pln_own = 0;
putplane(plane.pln_uid, &plane);
}

View file

@ -460,11 +460,11 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
sprintf(buf, "loaded on your %s at %s",
prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own));
gift(sp->shp_own, player->cnum, &pln, EF_PLANE, buf);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
pln.pln_own = sp->shp_own;
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
pln.pln_mission = 0;
putplane(pln.pln_uid, &pln);
} else {
@ -478,11 +478,11 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
dchr[sectp->sct_type].d_name,
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
gift(sectp->sct_own, player->cnum, &pln, EF_PLANE, buf);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
pln.pln_own = sectp->sct_own;
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
putplane(pln.pln_uid, &pln);
}
pr("%s %s %s at %s.\n",
@ -631,11 +631,11 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
sprintf(buf, "loaded on your %s at %s",
prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own));
gift(sp->shp_own, player->cnum, &land, EF_LAND, buf);
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = sp->shp_own;
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_ship = sp->shp_uid;
land.lnd_harden = 0;
land.lnd_mission = 0;
@ -875,11 +875,11 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
sprintf(buf, "loaded on %s at %s",
prland(lp), xyas(lp->lnd_x, lp->lnd_y, lp->lnd_own));
gift(lp->lnd_own, player->cnum, &pln, EF_PLANE, buf);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
pln.pln_own = lp->lnd_own;
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
putplane(pln.pln_uid, &pln);
} else {
if (!take_plane_off_land(&pln, lp)) {
@ -891,11 +891,11 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
sprintf(buf, "unloaded at your sector at %s",
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
gift(sectp->sct_own, player->cnum, &pln, EF_PLANE, buf);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makelost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
pln.pln_own = sectp->sct_own;
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid, pln.pln_x,
pln.pln_y);
makenotlost(EF_PLANE, pln.pln_own, pln.pln_uid,
pln.pln_x, pln.pln_y);
putplane(pln.pln_uid, &pln);
}
pr("%s %s %s at %s.\n",
@ -1090,11 +1090,11 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
sprintf(buf, "loaded on your %s at %s",
prland(lp), xyas(lp->lnd_x, lp->lnd_y, lp->lnd_own));
gift(lp->lnd_own, player->cnum, &land, EF_LAND, buf);
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = lp->lnd_own;
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_land = lp->lnd_uid;
land.lnd_harden = 0;
land.lnd_mission = 0;
@ -1125,11 +1125,11 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
dchr[sectp->sct_type].d_name,
xyas(sectp->sct_x, sectp->sct_y, sectp->sct_own));
gift(sectp->sct_own, player->cnum, &land, EF_LAND, buf);
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = sectp->sct_own;
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_land = -1;
lp->lnd_nland--;
putland(land.lnd_uid, &land);

View file

@ -334,8 +334,9 @@ multifire(void)
}
shell = fship.shp_item[I_SHELL];
if (shell < 2)
shell += supply_commod(fship.shp_own, fship.shp_x,
fship.shp_y, I_SHELL, 2 - shell);
shell += supply_commod(fship.shp_own,
fship.shp_x, fship.shp_y,
I_SHELL, 2 - shell);
if (shell <= 0) {
pr("Klick! ...\n");
continue;
@ -426,8 +427,8 @@ multifire(void)
fy = fsect.sct_y;
if (fsect.sct_own != player->cnum ||
fsect.sct_type != SCT_FORTR) {
pr("No fortress at %s\n", xyas(fsect.sct_x,
fsect.sct_y, player->cnum));
pr("No fortress at %s\n",
xyas(fsect.sct_x, fsect.sct_y, player->cnum));
continue;
}
if (target == targ_land) {
@ -444,8 +445,9 @@ multifire(void)
}
shell = fsect.sct_item[I_SHELL];
if (shell <= 0)
shell += supply_commod(fsect.sct_own, fsect.sct_x,
fsect.sct_y, I_SHELL, 1);
shell += supply_commod(fsect.sct_own,
fsect.sct_x, fsect.sct_y,
I_SHELL, 1);
if (shell <= 0) {
pr("Klick! ...\n");
continue;
@ -793,7 +795,8 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
if (mchr[(int)ship.shp_type].m_flags & M_SUB) {
if (shell < SHP_TORP_SHELLS)
shell += supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
shell += supply_commod(ship.shp_own,
ship.shp_x, ship.shp_y,
I_SHELL, SHP_TORP_SHELLS - shell);
if (shell < SHP_TORP_SHELLS)
continue;
@ -834,8 +837,8 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
continue;
/* must have gun, shell, and milit to fire */
if (shell < 1)
shell += supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
I_SHELL, 1);
shell += supply_commod(ship.shp_own,
ship.shp_x, ship.shp_y, I_SHELL, 1);
/* only need 1 shell, so don't check that */
if (shell < 1)
continue;

View file

@ -50,20 +50,19 @@
#include "optlist.h"
/*
** Command syntax:
**
** ORDER <ship> Show orders
** ORDER <ship> c[ancel] Cancel orders
** ORDER <ship> s[top] Suspend orders
** ORDER <ship> r[esume] Resume orders
** ORDER <ship> d[eclare] <dest1> Set destination
** d[eclare] <dest1> <dest2>
** ORDER <ship> l[evel] <field> <start/end> <comm> <level>
**
**
** New syntax:
** qorder <ship> display cargo levels
** sorder <ship> display statistical info
* Command syntax:
*
* ORDER <ship> Show orders
* ORDER <ship> c[ancel] Cancel orders
* ORDER <ship> s[top] Suspend orders
* ORDER <ship> r[esume] Resume orders
* ORDER <ship> d[eclare] <dest1> Set destination
* d[eclare] <dest1> <dest2>
* ORDER <ship> l[evel] <field> <start/end> <comm> <level>
*
* New syntax:
* qorder <ship> display cargo levels
* sorder <ship> display statistical info
*/
int
@ -471,9 +470,9 @@ sorde(void)
else {
/* ETA calculation */
c = BestShipPath(buf, ship.shp_x,
ship.shp_y, ship.shp_destx[0],
ship.shp_desty[0], ship.shp_own);
c = BestShipPath(buf, ship.shp_x, ship.shp_y,
ship.shp_destx[0], ship.shp_desty[0],
ship.shp_own);
if (!c)
pr(" no route possible");
else if (*c == 'h')

View file

@ -157,10 +157,9 @@ setsector(void)
wu(player->cnum, amt,
"Sector %s gained from deity intervention\n",
xyas(sect.sct_x, sect.sct_y, amt));
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x,
sect.sct_y);
makelost(EF_SECTOR, sect.sct_own, 0,
sect.sct_x, sect.sct_y);
makenotlost(EF_SECTOR, amt, 0, sect.sct_x, sect.sct_y);
sect.sct_own = (natid)amt;
putsect(&sect);
}

View file

@ -261,8 +261,8 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
tmcp = &mchr[(int)targ->shp_type];
if (!(tmcp->m_flags & M_SUB))
continue;
if (roll(100) >
pln_identchance(pp, shp_hardtarget(targ), EF_SHIP))
if (roll(100) > pln_identchance(pp, shp_hardtarget(targ),
EF_SHIP))
continue;
pingrange = MAX(targ->shp_visib, 10) * range / 10;
vrange = pingrange * (pp->pln_effic / 200.0);
@ -289,8 +289,8 @@ plane_sona(struct emp_qelem *plane_list, int x, int y,
if (getrel(getnatp(targ->shp_own), pp->pln_own) < FRIENDLY &&
roll(100) > pln_identchance(pp, shp_hardtarget(targ),
EF_SHIP))
if (roll(100) >
pln_identchance(pp, shp_hardtarget(targ), EF_SHIP))
if (roll(100) > pln_identchance(pp, shp_hardtarget(targ),
EF_SHIP))
mpr(pp->pln_own, "sub #%d %s\n", targ->shp_uid,
xyas(targ->shp_x, targ->shp_y, pp->pln_own));
else

View file

@ -180,8 +180,7 @@ spy(void)
} else {
insert(table, &t_len, nx, ny);
spyline(&dsect);
changed += map_set(player->cnum, dsect.sct_x,
dsect.sct_y,
changed += map_set(player->cnum, dsect.sct_x, dsect.sct_y,
dchr[dsect.sct_type].d_mnem, 0);
prunits(dsect.sct_x, dsect.sct_y);
prplanes(dsect.sct_x, dsect.sct_y);
@ -195,8 +194,7 @@ spy(void)
if (nrecon && caught) {
insert(table, &t_len, nx, ny);
spyline(&dsect);
changed += map_set(player->cnum, dsect.sct_x,
dsect.sct_y,
changed += map_set(player->cnum, dsect.sct_x, dsect.sct_y,
dchr[dsect.sct_type].d_mnem, 0);
prunits(dsect.sct_x, dsect.sct_y);
prplanes(dsect.sct_x, dsect.sct_y);

View file

@ -272,11 +272,11 @@ tend_land(struct shpstr *tenderp, char *units)
prship(&target), xyas(target.shp_x, target.shp_y,
target.shp_own));
gift(target.shp_own, player->cnum, &land, EF_LAND, buf);
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = target.shp_own;
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_ship = target.shp_uid;
land.lnd_harden = 0;
land.lnd_mission = 0;

View file

@ -352,9 +352,8 @@ fire_dchrg(struct shpstr *sp, struct shpstr *targ, int ntargets)
gun = MIN(gun, sp->shp_glim);
gun = MIN(gun, sp->shp_item[I_MILIT] / 2);
shells +=
supply_commod(sp->shp_own, sp->shp_x, sp->shp_y, I_SHELL,
(gun + 1) / 2 - shells);
shells += supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_SHELL, (gun + 1) / 2 - shells);
gun = MIN(gun, shells * 2);
if (gun == 0)
@ -403,8 +402,8 @@ fire_torp(struct shpstr *sp, struct shpstr *targ, int range, int ntargets)
shells = sp->shp_item[I_SHELL];
if (shells < SHP_TORP_SHELLS)
shells += supply_commod(sp->shp_own, sp->shp_x, sp->shp_y, I_SHELL,
SHP_TORP_SHELLS - shells);
shells += supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_SHELL, SHP_TORP_SHELLS - shells);
if (sp->shp_item[I_GUN] == 0 || shells < SHP_TORP_SHELLS)
return 0;

View file

@ -389,8 +389,8 @@ check_trade(void)
case EF_NUKE:
tg.nuk.nuk_x = trade.trd_x;
tg.nuk.nuk_y = trade.trd_y;
makelost(EF_NUKE, tg.nuk.nuk_own, tg.nuk.nuk_uid, tg.nuk.nuk_x,
tg.nuk.nuk_y);
makelost(EF_NUKE, tg.nuk.nuk_own, tg.nuk.nuk_uid,
tg.nuk.nuk_x, tg.nuk.nuk_y);
tg.nuk.nuk_own = trade.trd_maxbidder;
makenotlost(EF_NUKE, tg.nuk.nuk_own, tg.nuk.nuk_uid,
tg.nuk.nuk_x, tg.nuk.nuk_y);
@ -430,8 +430,8 @@ check_trade(void)
ship.shp_nland--;
putship(ship.shp_uid, &ship);
}
makelost(EF_LAND, tg.lnd.lnd_own, tg.lnd.lnd_uid, tg.lnd.lnd_x,
tg.lnd.lnd_y);
makelost(EF_LAND, tg.lnd.lnd_own, tg.lnd.lnd_uid,
tg.lnd.lnd_x, tg.lnd.lnd_y);
tg.lnd.lnd_own = trade.trd_maxbidder;
makenotlost(EF_LAND, tg.lnd.lnd_own, tg.lnd.lnd_uid,
tg.lnd.lnd_x, tg.lnd.lnd_y);

View file

@ -133,8 +133,8 @@ vers(void)
}
pr("\n");
pr("\t\t\t\tSectors\tShips\tPlanes\tUnits\n");
pr("Maximum mobility\t\t%d\t%d\t%d\t%d\n", sect_mob_max,
ship_mob_max, plane_mob_max, land_mob_max);
pr("Maximum mobility\t\t%d\t%d\t%d\t%d\n",
sect_mob_max, ship_mob_max, plane_mob_max, land_mob_max);
pr("Max mob gain per update\t\t%d\t%d\t%d\t%d\n",
(int)(sect_mob_scale * (float)etu_per_update),
(int)(ship_mob_scale * (float)etu_per_update),

View file

@ -126,8 +126,8 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
mpr(land.lnd_own, "\07");
mpr(land.lnd_own, " AARGH! %s tumbles to its doom!\n",
prland(&land));
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = 0;
land.lnd_effic = 0;
putland(land.lnd_uid, &land);
@ -149,8 +149,8 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
mpr(plane.pln_own, "\07");
mpr(plane.pln_own, " AARGH! %s tumbles to its doom!\n",
prplane(&plane));
makelost(EF_PLANE, plane.pln_own, plane.pln_uid, plane.pln_x,
plane.pln_y);
makelost(EF_PLANE, plane.pln_own, plane.pln_uid,
plane.pln_x, plane.pln_y);
plane.pln_own = 0;
plane.pln_effic = 0;
putplane(plane.pln_uid, &plane);
@ -167,8 +167,8 @@ knockdown(struct sctstr *sp, struct emp_qelem *list)
mpr(nuke.nuk_own, "\07");
mpr(nuke.nuk_own, " %s sinks to the bottom of the sea!\n",
prnuke(&nuke));
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid, nuke.nuk_x,
nuke.nuk_y);
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid,
nuke.nuk_x, nuke.nuk_y);
nuke.nuk_own = 0;
nuke.nuk_effic = 0;
putnuke(nuke.nuk_uid, &nuke);

View file

@ -183,8 +183,8 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
} else {
PR(plane_owner, "flying over %s at %s\n",
dchr[sect.sct_type].d_name, xyas(x, y, plane_owner));
changed += map_set(plane_owner, sect.sct_x,
sect.sct_y, dchr[sect.sct_type].d_mnem, 0);
changed += map_set(plane_owner, sect.sct_x, sect.sct_y,
dchr[sect.sct_type].d_mnem, 0);
}
if ((rel = getrel(over, plane_owner)) == ALLIED)
continue;
@ -310,8 +310,8 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
/* Flag that we intercepted */
intown = 1;
/* And now intercept again */
ac_intercept(bomb_list, esc_list, &ilist[cn], cn, x,
y);
ac_intercept(bomb_list, esc_list, &ilist[cn],
cn, x, y);
}
}
}
@ -336,8 +336,8 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
if (!evaded) {
if (intown == -1) {
/* We haven't intercepted yet, so intercept */
ac_intercept(bomb_list, esc_list, &ilist[cn], cn,
x, y);
ac_intercept(bomb_list, esc_list, &ilist[cn],
cn, x, y);
}
}
}
@ -837,8 +837,8 @@ ac_shipflak(struct emp_qelem *list, coord x, coord y)
if (gun) {
shell = ship.shp_item[I_SHELL];
if (shell <= 0) {
shell = supply_commod(ship.shp_own, ship.shp_x,
ship.shp_y, I_SHELL, 1);
shell = supply_commod(ship.shp_own, ship.shp_x, ship.shp_y,
I_SHELL, 1);
ship.shp_item[I_SHELL] = shell;
putship(ship.shp_uid, &ship);
}

View file

@ -384,11 +384,11 @@ put_combat(struct combat *com)
else
land.lnd_mobil = (signed char)(com->mob - com->mobcost);
}
makelost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makelost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
land.lnd_own = com->own;
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid, land.lnd_x,
land.lnd_y);
makenotlost(EF_LAND, land.lnd_own, land.lnd_uid,
land.lnd_x, land.lnd_y);
if (com->plague) {
if (land.lnd_pstage == PLG_HEALTHY)
land.lnd_pstage = PLG_EXPOSED;
@ -412,11 +412,11 @@ put_combat(struct combat *com)
else
ship.shp_mobil = (signed char)(com->mob - com->mobcost);
}
makelost(EF_SHIP, ship.shp_own, ship.shp_uid, ship.shp_x,
ship.shp_y);
makelost(EF_SHIP, ship.shp_own, ship.shp_uid,
ship.shp_x, ship.shp_y);
ship.shp_own = com->own;
makenotlost(EF_SHIP, ship.shp_own, ship.shp_uid, ship.shp_x,
ship.shp_y);
makenotlost(EF_SHIP, ship.shp_own, ship.shp_uid,
ship.shp_x, ship.shp_y);
if (com->plague) {
if (ship.shp_pstage == PLG_HEALTHY)
ship.shp_pstage = PLG_EXPOSED;

View file

@ -301,8 +301,8 @@ detonate(struct nukstr *np, coord x, coord y, int airburst)
continue;
if (roll(100) >= damage)
continue;
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid, nuke.nuk_x,
nuke.nuk_y);
makelost(EF_NUKE, nuke.nuk_own, nuke.nuk_uid,
nuke.nuk_x, nuke.nuk_y);
nuke.nuk_own = 0;
if (own == bombown) {
mpr(bombown, "%s at %s destroyed\n",

View file

@ -137,10 +137,8 @@ sd(natid att, natid own, coord x, coord y, int noisy, int defending,
else
wu(0, ship.shp_own,
"%s supported %s attacks against %s at %s, doing %d damage.\n",
prship(&ship), cname(own), cname(att), xyas(x, y,
ship.
shp_own),
dam);
prship(&ship), cname(own), cname(att),
xyas(x, y, ship.shp_own), dam);
}
}
}
@ -233,8 +231,8 @@ sb(natid att, natid def, struct sctstr *sp, coord tx, coord ty, int noisy,
return 0;
shell = sp->sct_item[I_SHELL];
if (shell <= 0)
shell += supply_commod(sp->sct_own, sp->sct_x, sp->sct_y, I_SHELL,
1);
shell += supply_commod(sp->sct_own, sp->sct_x, sp->sct_y,
I_SHELL, 1);
if (shell <= 0)
return 0;
sp->sct_item[I_SHELL] = shell - 1;
@ -243,11 +241,8 @@ sb(natid att, natid def, struct sctstr *sp, coord tx, coord ty, int noisy,
if (sp->sct_own != def)
wu(0, sp->sct_own,
"%s fired on %s in %s in defense of %s, doing %d damage!\n",
xyas(sp->sct_x, sp->sct_y, sp->sct_own), cname(att), xyas(tx,
ty,
sp->
sct_own),
cname(def), damage);
xyas(sp->sct_x, sp->sct_y, sp->sct_own), cname(att),
xyas(tx, ty, sp->sct_own), cname(def), damage);
if (defending)
nreport(sp->sct_own, N_FIRE_BACK, att, 1);
else

View file

@ -123,8 +123,8 @@ lnd_prewrite(int n, void *ptr)
time(&llp->lnd_timestamp);
if (llp->lnd_own && llp->lnd_effic < LAND_MINEFF) {
makelost(EF_LAND, llp->lnd_own, llp->lnd_uid, llp->lnd_x,
llp->lnd_y);
makelost(EF_LAND, llp->lnd_own, llp->lnd_uid,
llp->lnd_x, llp->lnd_y);
llp->lnd_own = 0;
getland(n, &land);
@ -132,8 +132,8 @@ lnd_prewrite(int n, void *ptr)
for (i = 0; NULL != (lp = getlandp(i)); i++) {
if (lp->lnd_own && lp->lnd_land == n) {
mpr(lp->lnd_own, "%s MIA!\n", prland(lp));
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
lp->lnd_y);
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
lp->lnd_effic = 0;
lp->lnd_ship = -1;
@ -144,8 +144,8 @@ lnd_prewrite(int n, void *ptr)
for (i = 0; NULL != (pp = getplanep(i)); i++) {
if (pp->pln_own && pp->pln_land == n) {
mpr(pp->pln_own, "%s MIA!\n", prplane(pp));
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
pp->pln_effic = 0;
pp->pln_ship = -1;

View file

@ -951,8 +951,8 @@ lnd_fort_interdiction(struct emp_qelem *list,
continue;
shell = fsect.sct_item[I_SHELL];
if (shell < 1)
shell += supply_commod(fsect.sct_own,
fsect.sct_x, fsect.sct_y, I_SHELL, 1);
shell += supply_commod(fsect.sct_own, fsect.sct_x, fsect.sct_y,
I_SHELL, 1);
if (shell < 1)
continue;
shell--;

View file

@ -1459,8 +1459,8 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
/* use up missiles */
if (plp->pcp->pl_flags & P_M) {
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
}
}

View file

@ -116,8 +116,8 @@ pln_prewrite(int n, void *ptr)
if (pp->pln_effic < PLANE_MINEFF) {
if (pp->pln_own)
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
pp->pln_effic = 0;
for (i = 0; NULL != (np = getnukep(i)); i++) {

View file

@ -727,9 +727,8 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, char mission)
} else {
if (pp->pln_own != sect.sct_own) {
wu(0, sect.sct_own, "%s %s prepares for takeoff from %s\n",
cname(pp->pln_own), prplane(pp), xyas(sect.sct_x,
sect.sct_y,
sect.sct_own));
cname(pp->pln_own), prplane(pp),
xyas(sect.sct_x, sect.sct_y, sect.sct_own));
}
putsect(&sect);
}

View file

@ -85,8 +85,8 @@ shp_prewrite(int n, void *ptr)
for (i = 0; NULL != (lp = getlandp(i)); i++) {
if (lp->lnd_own && lp->lnd_ship == n) {
mpr(lp->lnd_own, "%s sunk!\n", prland(lp));
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
lp->lnd_y);
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
lp->lnd_effic = 0;
lp->lnd_ship = -1;
@ -97,8 +97,8 @@ shp_prewrite(int n, void *ptr)
for (i = 0; NULL != (pp = getplanep(i)); i++) {
if (pp->pln_own && pp->pln_ship == n) {
mpr(pp->pln_own, "%s sunk!\n", prplane(pp));
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
pp->pln_effic = 0;
pp->pln_ship = -1;

View file

@ -404,8 +404,8 @@ sect_has_dock(struct sctstr *sect)
}
static int
shp_count(struct emp_qelem *list, int wantflags, int nowantflags, int x,
int y)
shp_count(struct emp_qelem *list, int wantflags, int nowantflags,
int x, int y)
{
struct emp_qelem *qp;
struct emp_qelem *next;
@ -686,8 +686,8 @@ shp_fort_interdiction(struct emp_qelem *list, coord newx, coord newy,
continue;
shell = fsect.sct_item[I_SHELL];
if (shell < 1)
shell += supply_commod(fsect.sct_own,
fsect.sct_x, fsect.sct_y, I_SHELL, 1);
shell += supply_commod(fsect.sct_own, fsect.sct_x, fsect.sct_y,
I_SHELL, 1);
if (shell < 1)
continue;
shell--;

View file

@ -90,7 +90,8 @@ resupply_commod(struct lndstr *lp, i_type type)
/* Ok, do we now have enough? */
amt = get_minimum(lp, type) - lp->lnd_item[type];
if (amt > 0) {
lp->lnd_item[type] += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
lp->lnd_item[type] += supply_commod(lp->lnd_own,
lp->lnd_x, lp->lnd_y,
type, amt);
amt = get_minimum(lp, type) - lp->lnd_item[type];
}
@ -550,8 +551,8 @@ use_supply(struct lndstr *lp)
if (shells < shells_needed) {
lp->lnd_item[I_SHELL] = 0;
putland(lp->lnd_uid, lp);
shells += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y, I_SHELL,
(shells_needed - shells));
shells += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
I_SHELL, shells_needed - shells);
lp->lnd_item[I_SHELL] = shells;
}
@ -566,8 +567,8 @@ use_supply(struct lndstr *lp)
if (food < food_needed) {
lp->lnd_item[I_FOOD] = 0;
putland(lp->lnd_uid, lp);
food += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y, I_FOOD,
(food_needed - food));
food += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
I_FOOD, food_needed - food);
lp->lnd_item[I_FOOD] = food;
}
@ -588,9 +589,8 @@ use_supply(struct lndstr *lp)
if (petrol < petrol_needed) {
lp->lnd_item[I_PETROL] = 0;
putland(lp->lnd_uid, lp);
petrol += supply_commod(lp->lnd_own,
lp->lnd_x, lp->lnd_y,
I_PETROL, (petrol_needed - petrol));
petrol += supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
I_PETROL, petrol_needed - petrol);
lp->lnd_item[I_PETROL] = petrol;
}

View file

@ -250,8 +250,8 @@ takeover_ship(struct shpstr *sp, natid newown, int hostile)
pp->pln_mission = 0;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = newown;
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
putplane(pp->pln_uid, pp);
}
/* Take over land units */
@ -287,11 +287,11 @@ takeover_land(struct lndstr *landp, natid newown, int hostile)
if (opt_MARKET)
trdswitchown(EF_LAND, landp, newown);
landp->lnd_mission = 0;
makelost(EF_LAND, landp->lnd_own, landp->lnd_uid, landp->lnd_x,
landp->lnd_y);
makelost(EF_LAND, landp->lnd_own, landp->lnd_uid,
landp->lnd_x, landp->lnd_y);
landp->lnd_own = newown;
makenotlost(EF_LAND, landp->lnd_own, landp->lnd_uid, landp->lnd_x,
landp->lnd_y);
makenotlost(EF_LAND, landp->lnd_own, landp->lnd_uid,
landp->lnd_x, landp->lnd_y);
pp = &p;
lp = &llp;
/* Take over planes */
@ -313,8 +313,8 @@ takeover_land(struct lndstr *landp, natid newown, int hostile)
pp->pln_mission = 0;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x, pp->pln_y);
pp->pln_own = newown;
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makenotlost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
putplane(pp->pln_uid, pp);
}
/* Take over land units */

View file

@ -192,8 +192,9 @@ assemble_dist_paths(struct distinfo *distptrs)
/* now, get the dist sector */
dist = getsectp(sp->sct_dist_x, sp->sct_dist_y);
if (dist == NULL) {
logerror("Bad dist sect %d,%d for %d,%d !\n", sp->sct_dist_x,
sp->sct_dist_y, sp->sct_x, sp->sct_y);
logerror("Bad dist sect %d,%d for %d,%d !\n",
sp->sct_dist_x, sp->sct_dist_y,
sp->sct_x, sp->sct_y);
continue;
}
/* Now, get the best distribution path over roads */

View file

@ -102,9 +102,9 @@ do_feed(struct sctstr *sp, struct natstr *np, short *vec,
needed = ldround((double)(1 + etu * people * eatrate), 1);
/* Now, find some food */
vec[I_FOOD] = supply_commod(sp->sct_own, sp->sct_x,
sp->sct_y, I_FOOD, needed);
vec[I_FOOD] = supply_commod(sp->sct_own,
sp->sct_x, sp->sct_y,
I_FOOD, needed);
}
}
starved = feed_people(vec, etu, &needed);

View file

@ -129,8 +129,8 @@ upd_land(struct lndstr *lp, int etus,
if (np->nat_priorities[PRI_LBUILD] == 0 || np->nat_money < 0)
return;
if (lp->lnd_effic < LAND_MINEFF || !landrepair(lp, np, bp, etus)) {
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
lp->lnd_y);
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
return;
}
@ -147,8 +147,8 @@ upd_land(struct lndstr *lp, int etus,
if ((eff = lp->lnd_effic - etus / 5) < LAND_MINEFF) {
wu(0, lp->lnd_own,
"%s lost to lack of maintenance\n", prland(lp));
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x,
lp->lnd_y);
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid,
lp->lnd_x, lp->lnd_y);
lp->lnd_own = 0;
return;
}

View file

@ -328,8 +328,8 @@ do_mob_ship(struct shpstr *sp, int etus)
if ((d - (int)d) > 0.0)
d++;
need = (int)d;
newfuel = supply_commod(sp->shp_own, sp->shp_x,
sp->shp_y, I_PETROL, need);
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_PETROL, need);
sp->shp_fuel += newfuel * 5;
}
@ -347,8 +347,8 @@ do_mob_ship(struct shpstr *sp, int etus)
if ((d - (int)d) > 0.0)
d++;
need = (int)d;
newfuel = supply_commod(sp->shp_own, sp->shp_x,
sp->shp_y, I_OIL, need);
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_OIL, need);
sp->shp_fuel += newfuel * 50;
}
@ -444,8 +444,8 @@ do_mob_land(struct lndstr *lp, int etus)
if ((d - (int)d) > 0.0)
d++;
need = (int)d;
newfuel = supply_commod(lp->lnd_own, lp->lnd_x,
lp->lnd_y, I_PETROL, need);
newfuel = supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
I_PETROL, need);
lp->lnd_fuel += newfuel * 5;
}
@ -461,8 +461,8 @@ do_mob_land(struct lndstr *lp, int etus)
if ((d - (int)d) > 0.0)
d++;
need = (int)d;
newfuel = supply_commod(lp->lnd_own, lp->lnd_x,
lp->lnd_y, I_OIL, need);
newfuel = supply_commod(lp->lnd_own, lp->lnd_x, lp->lnd_y,
I_OIL, need);
lp->lnd_fuel += newfuel * 50;
}

View file

@ -219,8 +219,8 @@ auto_fuel_ship(struct shpstr *sp)
d++;
need = (int)d;
newfuel = supply_commod(sp->shp_own, sp->shp_x,
sp->shp_y, I_PETROL, need);
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_PETROL, need);
add_fuel += newfuel * 5;
if (add_fuel > maxfuel)
add_fuel = maxfuel;
@ -238,8 +238,8 @@ auto_fuel_ship(struct shpstr *sp)
d++;
need = (int)d;
newfuel = supply_commod(sp->shp_own, sp->shp_x,
sp->shp_y, I_OIL, need);
newfuel = supply_commod(sp->shp_own, sp->shp_x, sp->shp_y,
I_OIL, need);
add_fuel = newfuel * 50;
if (add_fuel > maxfuel)
add_fuel = maxfuel;

View file

@ -113,8 +113,8 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
/* nplane is unsigned... */
if (shp->shp_nplane > 0)
shp->shp_nplane--;
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
continue;
}
@ -135,8 +135,8 @@ prod_plane(int etus, int natnum, int *bp, int buildem)
if ((eff = pp->pln_effic - etus / 5) < PLANE_MINEFF) {
wu(0, pp->pln_own,
"%s lost to lack of maintenance\n", prplane(pp));
makelost(EF_PLANE, pp->pln_own, pp->pln_uid, pp->pln_x,
pp->pln_y);
makelost(EF_PLANE, pp->pln_own, pp->pln_uid,
pp->pln_x, pp->pln_y);
pp->pln_own = 0;
continue;
}

View file

@ -132,8 +132,8 @@ upd_ship(struct shpstr *sp, int etus,
if (np->nat_priorities[PRI_SBUILD] == 0 || np->nat_money < 0)
return;
if (sp->shp_effic < SHIP_MINEFF || !shiprepair(sp, np, bp, etus)) {
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x,
sp->shp_y);
makelost(EF_SHIP, sp->shp_own, sp->shp_uid,
sp->shp_x, sp->shp_y);
sp->shp_own = 0;
return;
}
@ -147,8 +147,8 @@ upd_ship(struct shpstr *sp, int etus,
if ((eff = sp->shp_effic - etus / 5) < SHIP_MINEFF) {
wu(0, sp->shp_own,
"%s lost to lack of maintenance\n", prship(sp));
makelost(EF_SHIP, sp->shp_own, sp->shp_uid, sp->shp_x,
sp->shp_y);
makelost(EF_SHIP, sp->shp_own, sp->shp_uid,
sp->shp_x, sp->shp_y);
sp->shp_own = 0;
return;
}