Just to make the next few commits easier to review.
int last, n;
char *p;
char buf[1024];
- int rel;
att_combat_init(def, EF_SECTOR);
/*
newx = def->x + diroff[n + 1][0];
newy = def->y + diroff[n + 1][1];
getsect(newx, newy, §); /* incase cross world boundary */
- rel = getrel(getnatp(sect.sct_own), player->cnum);
- if (!player->owner && rel != ALLIED)
+ if (!player->owner
+ && getrel(getnatp(sect.sct_own), player->cnum) != ALLIED)
continue;
att_combat_init(&off[++last], EF_SECTOR);
off[last].x = sect.sct_x;
int n;
int tlev;
int avail, cost;
- int rel;
long cash;
if (!snxtitem(&ni, EF_LAND, player->argp[2], NULL))
continue;
if (sect.sct_type != SCT_HEADQ || sect.sct_effic < 60)
continue;
- rel = getrel(getnatp(land.lnd_own), sect.sct_own);
- if (rel < FRIENDLY && sect.sct_own != land.lnd_own) {
+ if (getrel(getnatp(land.lnd_own), sect.sct_own) < FRIENDLY
+ && sect.sct_own != land.lnd_own) {
pr("You are not on friendly terms with the owner of unit %d!\n",
land.lnd_uid);
continue;
int n;
int tlev;
int avail, cost;
- int rel;
long cash;
if (!snxtitem(&ni, EF_SHIP, player->argp[2], NULL))
continue;
if (sect.sct_type != SCT_HARBR || sect.sct_effic < 60)
continue;
- rel = getrel(getnatp(ship.shp_own), sect.sct_own);
- if (rel < FRIENDLY && sect.sct_own != ship.shp_own) {
+ if (getrel(getnatp(ship.shp_own), sect.sct_own) < FRIENDLY
+ && sect.sct_own != ship.shp_own) {
pr("You are not on friendly terms with the owner of ship %d!\n",
ship.shp_uid);
continue;
int n;
int tlev;
int avail, cost;
- int rel;
long cash;
if (!snxtitem(&ni, EF_PLANE, player->argp[2], NULL))
continue;
if (sect.sct_type != SCT_AIRPT || sect.sct_effic < 60)
continue;
- rel = getrel(getnatp(plane.pln_own), sect.sct_own);
- if (rel < FRIENDLY && sect.sct_own != plane.pln_own) {
+ if (getrel(getnatp(plane.pln_own), sect.sct_own) < FRIENDLY
+ && sect.sct_own != plane.pln_own) {
pr("You are not on friendly terms with the owner of plane %d!\n",
plane.pln_uid);
continue;
struct mchrstr *mcp;
double flak, total, ngun;
int gun;
- int rel;
struct plist *plp;
natid plane_owner;
natid from;
mcp = &mchr[(int)ship.shp_type];
if (mcp->m_flags & M_SUB)
continue;
- rel = getrel(getnatp(ship.shp_own), plane_owner);
- if (rel > HOSTILE)
+ if (getrel(getnatp(ship.shp_own), plane_owner) > HOSTILE)
continue;
gun = shp_usable_guns(&ship);
if (gun == 0)
struct lchrstr *lcp;
double flak, total, ngun;
int aaf, gun;
- int rel;
struct plist *plp;
natid plane_owner;
natid from;
continue;
if (land.lnd_ship >= 0 || land.lnd_land >= 0)
continue;
- rel = getrel(getnatp(land.lnd_own), plane_owner);
- if (rel > HOSTILE)
+ if (getrel(getnatp(land.lnd_own), plane_owner) > HOSTILE)
continue;
flak = aaf * 1.5 * land.lnd_effic / 100.0;
ngun += flak;
coord ally;
int first = 1;
char mess[128];
- int rel;
*minmobp = 9876.0;
*maxmobp = -9876.0;
lnd_stays(actor, "has no mil on it to guide it", llp);
continue;
}
- rel = getrel(getnatp(sect.sct_own), actor);
- if (sect.sct_own != land.lnd_own && rel != ALLIED &&
+ if (sect.sct_own != land.lnd_own &&
+ getrel(getnatp(sect.sct_own), actor) != ALLIED &&
!(lchr[(int)llp->unit.land.lnd_type].l_flags & L_SPY) &&
sect.sct_own) {
sprintf(mess, "has been kidnapped by %s", cname(sect.sct_own));
int w_p_eff;
int mult;
int mvec[I_MAX + 1];
- int rel;
mp = &mchr[(int)ship->shp_type];
sp = getsectp(ship->shp_x, ship->shp_y);
if ((sp->sct_own != ship->shp_own) && (sp->sct_own != 0)) {
- rel = getrel(getnatp(sp->sct_own), ship->shp_own);
-
- if (rel < FRIENDLY)
+ if (getrel(getnatp(sp->sct_own), ship->shp_own) < FRIENDLY)
return;
}