Use relations_with() for US==THEM || getrel(getnatp(US), THEM)

Replacing getrel(getnatp(US), THEM) by relations_with(US, THEM) makes
a difference only when US equals THEM.

Replace patterns like "us == them || getrel(getnatp(us), them)..." by
"relations_with(us, them)...".
This commit is contained in:
Markus Armbruster 2011-01-26 19:41:28 +01:00 committed by Markus Armbruster
parent ef7b9cedc3
commit 8e75b22e0d
Notes: Markus Armbruster 2013-01-26 12:01:24 +01:00
Author: Markus Armbruster <armbru@pond.sub.org>

Same guy, wrong e-mail address.
13 changed files with 25 additions and 46 deletions

View file

@ -268,8 +268,7 @@ shiprepair(struct shpstr *ship, struct natstr *np, struct bp *bp, int etus)
sp = getsectp(ship->shp_x, ship->shp_y);
if (sp->sct_own != 0
&& sp->sct_own != ship->shp_own
&& getrel(getnatp(sp->sct_own), ship->shp_own) < FRIENDLY)
&& relations_with(sp->sct_own, ship->shp_own) < FRIENDLY)
return;
/* only military can work on a military boat */