Eliminate a few pointless relations variables
Just to make the next few commits easier to review.
This commit is contained in:
parent
bb5cd07ce5
commit
7ebbe7da4c
5 changed files with 13 additions and 25 deletions
|
@ -60,7 +60,6 @@ atta(void)
|
|||
int last, n;
|
||||
char *p;
|
||||
char buf[1024];
|
||||
int rel;
|
||||
|
||||
att_combat_init(def, EF_SECTOR);
|
||||
/*
|
||||
|
@ -95,8 +94,8 @@ atta(void)
|
|||
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;
|
||||
|
|
|
@ -84,7 +84,6 @@ lupgr(void)
|
|||
int n;
|
||||
int tlev;
|
||||
int avail, cost;
|
||||
int rel;
|
||||
long cash;
|
||||
|
||||
if (!snxtitem(&ni, EF_LAND, player->argp[2], NULL))
|
||||
|
@ -101,8 +100,8 @@ lupgr(void)
|
|||
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;
|
||||
|
@ -166,7 +165,6 @@ supgr(void)
|
|||
int n;
|
||||
int tlev;
|
||||
int avail, cost;
|
||||
int rel;
|
||||
long cash;
|
||||
|
||||
if (!snxtitem(&ni, EF_SHIP, player->argp[2], NULL))
|
||||
|
@ -183,8 +181,8 @@ supgr(void)
|
|||
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;
|
||||
|
@ -247,7 +245,6 @@ pupgr(void)
|
|||
int n;
|
||||
int tlev;
|
||||
int avail, cost;
|
||||
int rel;
|
||||
long cash;
|
||||
|
||||
if (!snxtitem(&ni, EF_PLANE, player->argp[2], NULL))
|
||||
|
@ -264,8 +261,8 @@ pupgr(void)
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue