No functional change, even though this changes rel[intruder] from
NEUTRAL to ALLIED. Uses of rel[]:
* getilists() and ac_encounter() compare rel[cn] to HOSTILE. No
change, because NEUTRAL and ALLIED are both greater than HOSTILE.
* ac_encounter() compares rel[cn] to ALLIED, but only when cn !=
plane_owner. Because it passes plane_owner as argument for
getilists() parameter intruder, rel[cn] can't refer to the changed
element of rel[] here.
The new value of rel[plane_owner] permits simplifying cn ==
plane_owner || rel[cn] == ALLIED to just rel[cn] == ALLIED.
if (!evaded) {
overfly[sect.sct_own]++;
for (cn = 1; cn < MAXNOC; cn++) {
- if (cn == plane_owner || rel[cn] == ALLIED)
+ if (rel[cn] == ALLIED)
continue;
if (cn != sect.sct_own && !gotships[cn] && !gotlands[cn])
continue;
/* Let's report all of the overflights even if aborted */
for (cn = 1; cn < MAXNOC; cn++) {
- if (plane_owner == cn)
- continue;
if (overfly[cn] > 0 && rel[cn] != ALLIED)
nreport(plane_owner, N_OVFLY_SECT, cn, overfly[cn]);
}
rel[0] = NEUTRAL;
for (cn = 1; cn < MAXNOC; cn++) {
- rel[cn] = getrel(getnatp(cn), intruder);
+ rel[cn] = relations_with(cn, intruder);
emp_initque(&list[cn]);
}