]> git.pond.sub.org Git - empserver/commitdiff
Fix making contact by spotting planes from sectors
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 24 Sep 2008 00:53:15 +0000 (20:53 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2009 16:14:38 +0000 (17:14 +0100)
ac_encounter() passed MAXNOC instead of the sector owner to setcont(),
and setcont() does nothing for such an argument.  Screwed up from the
start, in commit 144c7cb5, v4.2.22.

src/lib/subs/aircombat.c

index f8e4eda003d911987ad952b87968919a9c5443dd..f0b7e2058f198ba4da90a7e298790b93cf1ed65e 100644 (file)
@@ -209,7 +209,7 @@ ac_encounter(struct emp_qelem *bomb_list, struct emp_qelem *esc_list,
            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);
+               setcont(sect.sct_own, plane_owner, FOUND_FLY);
        }
 
        if (!evaded) {