Make planes report non-hostile ships and lands in target sector

Before, ac_encounter() reported only ships and land units hostile to
the planes.
This commit is contained in:
Markus Armbruster 2008-09-21 11:02:10 -04:00
parent b624ce30dd
commit 2030decb99

View file

@ -296,20 +296,18 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
/* Are there ships owned by this country? */ /* Are there ships owned by this country? */
if (nats[cn] != 0) { if (nats[cn] != 0) {
/* Yes. */ /* Yes. */
if (cn != 0) { PR(plane_owner, "Flying over %s ships in %s\n",
PR(cn, "%s planes spotted over ships in %s\n", cname(cn), xyas(x, y, plane_owner));
cname(plane_owner), xyas(x, y, cn)); PR(cn, "%s planes spotted over ships in %s\n",
if (opt_HIDDEN) cname(plane_owner), xyas(x, y, cn));
setcont(cn, plane_owner, FOUND_FLY); if (opt_HIDDEN)
} setcont(cn, plane_owner, FOUND_FLY);
if (unfriendly[cn]) { if (unfriendly[cn]) {
/* They are unfriendly too */ /* They are unfriendly too */
if (!gotilist[cn]) { if (!gotilist[cn]) {
getilist(&ilist[cn], cn); getilist(&ilist[cn], cn);
gotilist[cn]++; gotilist[cn]++;
} }
PR(plane_owner, "Flying over %s ships in %s\n",
cname(cn), xyas(x, y, plane_owner));
/* This makes going for ships in harbors tough */ /* This makes going for ships in harbors tough */
if (!evaded) { if (!evaded) {
/* We already fired flak up above. Now we intercept again if we haven't already */ /* We already fired flak up above. Now we intercept again if we haven't already */
@ -324,20 +322,18 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
/* Are there units owned by this country? */ /* Are there units owned by this country? */
if (lnats[cn] != 0) { if (lnats[cn] != 0) {
/* Yes. */ /* Yes. */
if (cn != 0) { PR(plane_owner, "Flying over %s land units in %s\n",
PR(cn, "%s planes spotted over land units in %s\n", cname(cn), xyas(x, y, plane_owner));
cname(plane_owner), xyas(x, y, cn)); PR(cn, "%s planes spotted over land units in %s\n",
if (opt_HIDDEN) cname(plane_owner), xyas(x, y, cn));
setcont(cn, plane_owner, FOUND_FLY); if (opt_HIDDEN)
} setcont(cn, plane_owner, FOUND_FLY);
if (unfriendly[cn]) { if (unfriendly[cn]) {
/* They are unfriendly too */ /* They are unfriendly too */
if (!gotilist[cn]) { if (!gotilist[cn]) {
getilist(&ilist[cn], cn); getilist(&ilist[cn], cn);
gotilist[cn]++; gotilist[cn]++;
} }
PR(plane_owner, "Flying over %s land units in %s\n",
cname(cn), xyas(x, y, plane_owner));
if (!evaded) { if (!evaded) {
if (intown == -1) { if (intown == -1) {
/* We haven't intercepted yet, so intercept */ /* We haven't intercepted yet, so intercept */