]> git.pond.sub.org Git - empserver/commitdiff
Fix spy to make contact when spy succeeds due to recon unit
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 14 Jun 2008 15:40:57 +0000 (17:40 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 14 Jun 2008 15:40:57 +0000 (17:40 +0200)
If you have a recon unit, you get a spy report whether the spy is
caught or not.  But you made contact only when he wasn't caught.  Fix
that.

src/lib/commands/spy.c

index 291ab46b4ddcab7d8b51392d126dda559f858dab..4ae5711f86678cfdc4248cd7392f5d4e78613fd2 100644 (file)
@@ -192,6 +192,8 @@ spy(void)
                                   dchr[dsect.sct_type].d_mnem, 0);
                prunits(dsect.sct_x, dsect.sct_y);
                prplanes(dsect.sct_x, dsect.sct_y);
+               if (opt_HIDDEN)
+                   setcont(player->cnum, own, FOUND_SPY);
            }
        }
        /* subtract any military if necessary */