]> git.pond.sub.org Git - empserver/commitdiff
(ac_encounter): Make contact on spotting planes. Closes #857594.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 2 Oct 2005 18:41:29 +0000 (18:41 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 2 Oct 2005 18:41:29 +0000 (18:41 +0000)
src/lib/subs/aircombat.c

index c8ac876cdaa6a2fc9441d5842a721eefa7ce5931..0b5559719bb5caaa93f1efcb9d8fdfece7434235 100644 (file)
@@ -201,6 +201,8 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
            overfly[sect.sct_own]++;
            PR(sect.sct_own, "%s planes spotted over %s\n",
               cname(plane_owner), xyas(x, y, sect.sct_own));
+           if (opt_HIDDEN)
+               setcont(cn, plane_owner, FOUND_FLY);
        }
 
        if (!evaded) {
@@ -291,9 +293,12 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
        /* Are there ships owned by this country? */
        if (nats[cn] != 0) {
            /* Yes. */
-           if (cn != 0)
+           if (cn != 0) {
                PR(cn, "%s planes spotted over ships in %s\n",
                   cname(plane_owner), xyas(x, y, cn));
+               if (opt_HIDDEN)
+                   setcont(cn, plane_owner, FOUND_FLY);
+           }
            if (unfriendly[cn]) {
                /* They are unfriendly too */
                if (!gotilist[cn]) {
@@ -317,9 +322,12 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
        /* Are there units owned by this country? */
        if (lnats[cn] != 0) {
            /* Yes. */
-           if (cn != 0)
+           if (cn != 0) {
                PR(cn, "%s planes spotted over land units in %s\n",
                   cname(plane_owner), xyas(x, y, cn));
+               if (opt_HIDDEN)
+                   setcont(cn, plane_owner, FOUND_FLY);
+           }
            if (unfriendly[cn]) {
                /* They are unfriendly too */
                if (!gotilist[cn]) {