Rearrange uses of getrel() slightly

Just to make the next few commits easier to review.
This commit is contained in:
Markus Armbruster 2011-01-29 09:57:21 +01:00
parent 7ebbe7da4c
commit ef7b9cedc3
5 changed files with 18 additions and 17 deletions

View file

@ -267,10 +267,10 @@ shiprepair(struct shpstr *ship, struct natstr *np, struct bp *bp, int etus)
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)) {
if (getrel(getnatp(sp->sct_own), ship->shp_own) < FRIENDLY)
return;
}
if (sp->sct_own != 0
&& sp->sct_own != ship->shp_own
&& getrel(getnatp(sp->sct_own), ship->shp_own) < FRIENDLY)
return;
/* only military can work on a military boat */
if (mp->m_glim != 0)