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:
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
|
@ -165,8 +165,7 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
|
|||
mp = &mchr[(int)sp->shp_type];
|
||||
getsect(sp->shp_x, sp->shp_y, §);
|
||||
if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2
|
||||
&& (sect.sct_own == sp->shp_own
|
||||
|| getrel(getnatp(sect.sct_own), sp->shp_own) >= FRIENDLY)) {
|
||||
&& relations_with(sect.sct_own, sp->shp_own) >= FRIENDLY) {
|
||||
dist = mapdist(sp->shp_x, sp->shp_y,
|
||||
sp->shp_orig_x, sp->shp_orig_y);
|
||||
/* Don't disclose distance to to pirates */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue