Use relations_with() where its different value doesn't matter

Switching from getrel() to relations_with() can change the value from
NEUTRAL to ALLIED.  The change doesn't matter when the value's only
compared to HOSTILE, as both old and new value are greater than
HOSTILE.  Likewise for >= NEUTRAL.
This commit is contained in:
Markus Armbruster 2011-01-30 11:46:17 +01:00
parent 8e75b22e0d
commit 6807cd91b5
5 changed files with 8 additions and 8 deletions

View file

@ -611,7 +611,7 @@ shp_fort_interdiction(struct emp_qelem *list, coord newx, coord newy,
return 0; /* Only coastwatch notify in nofortfire */
/* Only fire at Hostile ships */
for (i = 0; i < MAXNOC; ++i) {
if (getrel(getnatp(i), victim) >= NEUTRAL)
if (relations_with(i, victim) >= NEUTRAL)
notified[i] = 0;
}
snxtsct_dist(&ns, newx, newy, fort_max_interdiction_range);
@ -849,7 +849,7 @@ shp_missile_defense(coord dx, coord dy, natid bombown, int hardtarget)
if (!(mchr[(int)ship.shp_type].m_flags & M_ANTIMISSILE))
continue;
if (getrel(getnatp(ship.shp_own), bombown) >= NEUTRAL)
if (relations_with(ship.shp_own, bombown) >= NEUTRAL)
continue;
if (ship.shp_effic < 60)