Indentation fixes; suspect indent-emp is to blame.
This commit is contained in:
parent
aa4e268d89
commit
e67dca9d29
29 changed files with 89 additions and 133 deletions
|
@ -110,8 +110,8 @@ bomb(void)
|
|||
wantflags = 0;
|
||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if (!snxtitem
|
||||
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
if (!snxtitem(&ni_esc, EF_PLANE,
|
||||
getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
pr("No escorts...\n");
|
||||
if ((p =
|
||||
getstarg(player->argp[3], "pinpoint, or strategic? ", buf)) == 0)
|
||||
|
@ -255,9 +255,8 @@ pin_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
nunits = unitsatxy(target->sct_x, target->sct_y, 0, 0);
|
||||
getvec(VT_ITEM, vec, (s_char *)target, EF_SECTOR);
|
||||
retry:
|
||||
p = getstring
|
||||
("Bomb what? (ship, plane, land unit, efficiency, commodities) ",
|
||||
buf);
|
||||
p = getstring("Bomb what? (ship, plane, land unit, efficiency, commodities) ",
|
||||
buf);
|
||||
if (p == 0 || *p == 0) {
|
||||
if (player->aborted)
|
||||
return;
|
||||
|
@ -598,8 +597,7 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
sprintf(msg, "Flak! Firing %d guns from ship %s\n",
|
||||
flak, prship(&ship));
|
||||
PR(ship.shp_own, msg);
|
||||
if (pinflak_planedamage
|
||||
(&plp->plane, plp->pcp, ship.shp_own, flak))
|
||||
if (pinflak_planedamage(&plp->plane, plp->pcp, ship.shp_own, flak))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -838,8 +836,7 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
"Flak! Firing flak guns from unit %s (aa rating %d)\n",
|
||||
prland(&land), land.lnd_aaf);
|
||||
PR(land.lnd_own, msg);
|
||||
if (pinflak_planedamage
|
||||
(&plp->plane, plp->pcp, land.lnd_own, flak))
|
||||
if (pinflak_planedamage(&plp->plane, plp->pcp, land.lnd_own, flak))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,10 +108,8 @@ coll(void)
|
|||
owed *= loan.l_amtdue;
|
||||
/* End overflow fix */
|
||||
pr("You are owed $%.2f on that loan.\n", owed);
|
||||
if (!
|
||||
(p =
|
||||
getstarg(player->argp[2],
|
||||
"What sector do you wish to confiscate? ", buf)))
|
||||
if (!(p = getstarg(player->argp[2],
|
||||
"What sector do you wish to confiscate? ", buf)))
|
||||
return RET_SYN;
|
||||
if (!check_loan_ok(&loan))
|
||||
return RET_FAIL;
|
||||
|
|
|
@ -51,11 +51,9 @@ decl(void)
|
|||
s_char *p;
|
||||
s_char buf[1024];
|
||||
|
||||
if (!
|
||||
(p =
|
||||
getstarg(player->argp[1],
|
||||
"alliance, friendly, neutrality, hostility, or war? ",
|
||||
buf)))
|
||||
if (!(p = getstarg(player->argp[1],
|
||||
"alliance, friendly, neutrality, hostility, or war? ",
|
||||
buf)))
|
||||
return RET_SYN;
|
||||
switch (*p) {
|
||||
case 'a':
|
||||
|
|
|
@ -73,7 +73,7 @@ deli(void)
|
|||
while (nxtsct(&nstr, §) > 0) {
|
||||
if (!player->owner)
|
||||
continue;
|
||||
|
||||
|
||||
del = getvar(i_del, (s_char *)§, EF_SECTOR);
|
||||
thresh = del & ~0x7;
|
||||
dir = del & 0x7;
|
||||
|
@ -100,7 +100,7 @@ deli(void)
|
|||
if (dir < 0)
|
||||
return RET_SYN;
|
||||
}
|
||||
|
||||
|
||||
if (!check_sect_ok(§))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -64,14 +64,11 @@ demo(void)
|
|||
cash = natp->nat_money;
|
||||
if (!snxtsct(&nstr, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if ((p =
|
||||
getstarg(player->argp[2], "Number to de-mobilize : ", buf)) == 0)
|
||||
if (!(p = getstarg(player->argp[2], "Number to de-mobilize : ", buf)))
|
||||
return RET_SYN;
|
||||
number = atoi(p);
|
||||
if (!
|
||||
(p =
|
||||
getstarg(player->argp[3],
|
||||
"New civilians on active reserve? (y/n) ", buf)))
|
||||
if (!(p = getstarg(player->argp[3],
|
||||
"New civilians on active reserve? (y/n) ", buf)))
|
||||
return RET_SYN;
|
||||
if (*p != 'y' && *p != 'n')
|
||||
return RET_SYN;
|
||||
|
|
|
@ -72,8 +72,8 @@ drop(void)
|
|||
wantflags = 0;
|
||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if (!snxtitem
|
||||
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
if (!snxtitem(&ni_esc, EF_PLANE,
|
||||
getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
pr("No escorts...\n");
|
||||
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|
||||
|| *p == 0)
|
||||
|
|
|
@ -76,8 +76,8 @@ fly(void)
|
|||
wantflags = 0;
|
||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if (!snxtitem
|
||||
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
if (!snxtitem(&ni_esc, EF_PLANE,
|
||||
getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
pr("No escorts...\n");
|
||||
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|
||||
|| *p == 0)
|
||||
|
|
|
@ -225,9 +225,8 @@ fuel(void)
|
|||
if (!player->argp[4])
|
||||
pr("%s is not in a supplied, efficient harbor\n",
|
||||
prship(&item.ship));
|
||||
if (!snxtitem
|
||||
(&tender, EF_SHIP,
|
||||
getstarg(player->argp[4], "Oiler? ", buf)))
|
||||
if (!snxtitem (&tender, EF_SHIP,
|
||||
getstarg(player->argp[4], "Oiler? ", buf)))
|
||||
continue;
|
||||
|
||||
if (!check_ship_ok(&item.ship))
|
||||
|
|
|
@ -217,9 +217,8 @@ launch_as(struct plnstr *pp)
|
|||
pr("No satellites there!\n");
|
||||
return -1;
|
||||
}
|
||||
if (msl_hit
|
||||
(pp, plane.pln_def, EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
||||
prplane(&plane), sx, sy, plane.pln_own)) {
|
||||
if (msl_hit(pp, plane.pln_def, EF_PLANE, N_SAT_KILL, N_SAT_KILL,
|
||||
prplane(&plane), sx, sy, plane.pln_own)) {
|
||||
dam = pln_damage(pp, sx, sy, 'p', &nukedam, 1);
|
||||
oldown = plane.pln_own;
|
||||
planedamage(&plane, dam);
|
||||
|
|
|
@ -393,8 +393,8 @@ load_plane_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
|
|||
}
|
||||
sprintf(prompt, "Plane(s) to %s %s? ",
|
||||
load_unload == LOAD ? "load onto" : "unload from", prship(sp));
|
||||
if (!snxtitem
|
||||
(&ni, EF_PLANE, p = getstarg(player->argp[3], prompt, buf)))
|
||||
if (!snxtitem(&ni, EF_PLANE,
|
||||
p = getstarg(player->argp[3], prompt, buf)))
|
||||
return RET_SYN;
|
||||
|
||||
if (!still_ok_ship(sectp, sp))
|
||||
|
@ -538,8 +538,8 @@ load_land_ship(struct sctstr *sectp, struct shpstr *sp, int noisy,
|
|||
}
|
||||
sprintf(prompt, "Land unit(s) to %s %s? ",
|
||||
load_unload == LOAD ? "load onto" : "unload from", prship(sp));
|
||||
if (!snxtitem
|
||||
(&ni, EF_LAND, p = getstarg(player->argp[3], prompt, buf)))
|
||||
if (!snxtitem(&ni, EF_LAND,
|
||||
p = getstarg(player->argp[3], prompt, buf)))
|
||||
return RET_SYN;
|
||||
|
||||
if (!still_ok_ship(sectp, sp))
|
||||
|
@ -858,8 +858,8 @@ load_plane_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
|
|||
}
|
||||
sprintf(prompt, "Plane(s) to %s %s? ",
|
||||
load_unload == LOAD ? "load onto" : "unload from", prland(lp));
|
||||
if (!snxtitem
|
||||
(&ni, EF_PLANE, p = getstarg(player->argp[3], prompt, buf)))
|
||||
if (!snxtitem(&ni, EF_PLANE,
|
||||
p = getstarg(player->argp[3], prompt, buf)))
|
||||
return RET_SYN;
|
||||
|
||||
if (!still_ok_land(sectp, lp))
|
||||
|
@ -1085,8 +1085,8 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
|
|||
}
|
||||
sprintf(prompt, "Land unit(s) to %s %s? ",
|
||||
load_unload == LOAD ? "load onto" : "unload from", prland(lp));
|
||||
if (!snxtitem
|
||||
(&ni, EF_LAND, p = getstarg(player->argp[3], prompt, buf)))
|
||||
if (!snxtitem(&ni, EF_LAND,
|
||||
p = getstarg(player->argp[3], prompt, buf)))
|
||||
return RET_SYN;
|
||||
|
||||
if (!still_ok_land(sectp, lp))
|
||||
|
|
|
@ -75,8 +75,8 @@ ltend(void)
|
|||
if (!(ip = whatitem(player->argp[1], "Transfer what commodity? ")))
|
||||
return RET_SYN;
|
||||
|
||||
if (!snxtitem
|
||||
(&tenders, EF_SHIP, getstarg(player->argp[2], "Tender(s)? ", buf)))
|
||||
if (!snxtitem(&tenders, EF_SHIP,
|
||||
getstarg(player->argp[2], "Tender(s)? ", buf)))
|
||||
return RET_SYN;
|
||||
while (nxtitem(&tenders, (s_char *)&tender)) {
|
||||
if (!player->owner)
|
||||
|
|
|
@ -829,8 +829,7 @@ quiet_bigdef(int attacker, struct emp_qelem *list, natid own, natid aown,
|
|||
range = mapdist(ship.shp_x, ship.shp_y, ax, ay);
|
||||
if (range > erange)
|
||||
continue;
|
||||
if (!line_of_sight
|
||||
((s_char **)0, ship.shp_x, ship.shp_y, ax, ay))
|
||||
if (!line_of_sight((s_char **)0, ship.shp_x, ship.shp_y, ax, ay))
|
||||
continue;
|
||||
|
||||
(*nfiring)++;
|
||||
|
|
|
@ -413,10 +413,9 @@ would_abandon(struct sctstr *sp, int vtype, int amnt, struct lndstr *lp)
|
|||
loyalcivs = 0;
|
||||
|
||||
/* If they have a military unit there, they still own it */
|
||||
if (sp->sct_own != 0 && ((loyalcivs == 0) && (mil == 0) &&
|
||||
(has_units
|
||||
(sp->sct_x, sp->sct_y, sp->sct_own,
|
||||
lp) == 0)))
|
||||
if (sp->sct_own != 0
|
||||
&& ((loyalcivs == 0) && (mil == 0)
|
||||
&& (has_units(sp->sct_x, sp->sct_y, sp->sct_own, lp) == 0)))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -77,8 +77,8 @@ para(void)
|
|||
wantflags = P_P;
|
||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if (!snxtitem
|
||||
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
if (!snxtitem(&ni_esc, EF_PLANE,
|
||||
getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
pr("No escorts...\n");
|
||||
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|
||||
|| *p == 0)
|
||||
|
|
|
@ -132,7 +132,7 @@ dreal()
|
|||
}
|
||||
pr("Realms for %s (#%d)\n",cname(nat),nat);
|
||||
natp = getnatp(nat);
|
||||
abs.width = 0;
|
||||
abs.width = 0;
|
||||
abs.height = 0;
|
||||
while (curr <= lastr) {
|
||||
b = &natp->nat_b[curr];
|
||||
|
|
|
@ -71,8 +71,8 @@ reco(void)
|
|||
wantflags = 0;
|
||||
if (!snxtitem(&ni_bomb, EF_PLANE, player->argp[1]))
|
||||
return RET_SYN;
|
||||
if (!snxtitem
|
||||
(&ni_esc, EF_PLANE, getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
if (!snxtitem(&ni_esc, EF_PLANE,
|
||||
getstarg(player->argp[2], "escort(s)? ", buf)))
|
||||
pr("No escorts...\n");
|
||||
if ((p = getstarg(player->argp[3], "assembly point? ", buf)) == 0
|
||||
|| *p == 0)
|
||||
|
|
|
@ -204,29 +204,22 @@ printdiff(int mystat, double ours, struct natstr *natp, int what)
|
|||
if (tolerance > 2 * ours)
|
||||
tolerance = (int)(2 * ours);
|
||||
if (check(buf, theirs, 2 * ours, -1.0, shift, what, tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, 1.5 * ours, 2.0 * ours, shift, what,
|
||||
else if (check(buf, theirs, 1.5 * ours, 2.0 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, 1.2 * ours, 1.5 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, 1.2 * ours, 1.5 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, 1.1 * ours, 1.2 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, ours / 1.1, 1.1 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, ours / 1.2, ours / 1.1, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, ours / 1.5, ours / 1.2, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, ours / 2.0, ours / 1.5, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check
|
||||
(buf, theirs, -1.0, ours / 2.0, shift, what, tolerance)) ;
|
||||
else if (check(buf, theirs, 1.1 * ours, 1.2 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, ours / 1.1, 1.1 * ours, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, ours / 1.2, ours / 1.1, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, ours / 1.5, ours / 1.2, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, ours / 2.0, ours / 1.5, shift, what,
|
||||
tolerance)) ;
|
||||
else if (check(buf, theirs, -1.0, ours / 2.0, shift, what,
|
||||
tolerance)) ;
|
||||
else
|
||||
sprintf(buf, " n/a");
|
||||
} else
|
||||
|
|
|
@ -68,8 +68,7 @@ swaps(void)
|
|||
!getsect(sectb.sct_x, sectb.sct_y, §b))
|
||||
return RET_SYN;
|
||||
print_res(§b);
|
||||
if (!confirm
|
||||
("Are you sure these are the two sectors you wish to swap? "))
|
||||
if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
|
||||
return RET_FAIL;
|
||||
/* save x and y from secta */
|
||||
x = secta.sct_x;
|
||||
|
|
|
@ -87,8 +87,8 @@ tend(void)
|
|||
return RET_SYN;
|
||||
}
|
||||
|
||||
if (!snxtitem
|
||||
(&tenders, EF_SHIP, getstarg(player->argp[2], "Tender(s)? ", buf)))
|
||||
if (!snxtitem(&tenders, EF_SHIP,
|
||||
getstarg(player->argp[2], "Tender(s)? ", buf)))
|
||||
return RET_SYN;
|
||||
|
||||
while (nxtitem(&tenders, (s_char *)&tender)) {
|
||||
|
|
|
@ -330,8 +330,7 @@ check_trade(void)
|
|||
continue;
|
||||
}
|
||||
if (tg.gen.trg_own != trade.trd_owner) {
|
||||
logerror
|
||||
("SOmething weird, tg.gen.trg_own != trade.trd_owner!\n");
|
||||
logerror("Something weird, tg.gen.trg_own != trade.trd_owner!\n");
|
||||
trade.trd_unitid = -1;
|
||||
puttrade(n, &trade);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue