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

@ -105,7 +105,7 @@ ground_interdict(coord x, coord y, natid victim, char *s)
memset(mi, 0, sizeof(mi));
act[0] = 0;
for (cn = 1; cn < MAXNOC; cn++) {
act[cn] = getrel(getnatp(cn), victim) <= HOSTILE;
act[cn] = relations_with(cn, victim) <= HOSTILE;
emp_initque((struct emp_qelem *)&mi[cn]);
}
@ -1041,7 +1041,7 @@ air_damage(struct emp_qelem *bombers, coord x, coord y, int mission,
prplane(pp), xyas(x, y, pp->pln_own));
continue;
}
if (getrel(getnatp(pp->pln_own), victim) > HOSTILE) {
if (relations_with(pp->pln_own, victim) > HOSTILE) {
wu(0, pp->pln_own,
"\t%s tracks %s %s at %s\n",
prplane(pp), cname(victim), s, xyas(x, y, pp->pln_own));