Fix trade ships to pay off in own harbor

Broken in commit 3318e4e4, v4.3.17.
This commit is contained in:
Markus Armbruster 2011-01-16 21:20:28 +01:00
parent 439f111f98
commit 16c68eb403

View file

@ -165,7 +165,8 @@ scuttle_tradeship(struct shpstr *sp, int interactive)
mp = &mchr[(int)sp->shp_type]; mp = &mchr[(int)sp->shp_type];
getsect(sp->shp_x, sp->shp_y, &sect); getsect(sp->shp_x, sp->shp_y, &sect);
if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2 if (sect.sct_own && sect.sct_type == SCT_HARBR && sect.sct_effic >= 2
&& getrel(getnatp(sect.sct_own), sp->shp_own) >= FRIENDLY) { && (sect.sct_own == sp->shp_own
|| getrel(getnatp(sect.sct_own), sp->shp_own) >= FRIENDLY)) {
dist = mapdist(sp->shp_x, sp->shp_y, dist = mapdist(sp->shp_x, sp->shp_y,
sp->shp_orig_x, sp->shp_orig_y); sp->shp_orig_x, sp->shp_orig_y);
/* Don't disclose distance to to pirates */ /* Don't disclose distance to to pirates */