From e36134038a679715b4cc7f5b60e9f8db73ad37df Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 3 Oct 2005 14:47:59 +0000 Subject: [PATCH] (notify_coastguard): Failed to make contact when NF_COASTWATCH was off. --- src/lib/subs/shpsub.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/lib/subs/shpsub.c b/src/lib/subs/shpsub.c index b8a8fe0c..843780c9 100644 --- a/src/lib/subs/shpsub.c +++ b/src/lib/subs/shpsub.c @@ -591,22 +591,17 @@ notify_coastguard(struct emp_qelem *list, int trange, struct sctstr *sectp) if (vrange < trange) return 0; - /* We got here, so we could theoretically see the ship. Now, - * do we want to see it in our telebox? If not, return positive - * since we could see the ship and want forts to fire. */ - if (!(natp->nat_flags & NF_COASTWATCH)) - return 1; - for (qp = list->q_back; qp != list; qp = next) { next = qp->q_back; mlp = (struct mlist *)qp; if (mlp->mcp->m_flags & M_SUB) continue; - wu(0, sectp->sct_own, - "%s %s sighted at %s\n", - cname(mlp->ship.shp_own), - prship(&mlp->ship), - xyas(mlp->ship.shp_x, mlp->ship.shp_y, sectp->sct_own)); + if (natp->nat_flags & NF_COASTWATCH) + wu(0, sectp->sct_own, + "%s %s sighted at %s\n", + cname(mlp->ship.shp_own), + prship(&mlp->ship), + xyas(mlp->ship.shp_x, mlp->ship.shp_y, sectp->sct_own)); if (opt_HIDDEN) setcont(sectp->sct_own, mlp->ship.shp_own, FOUND_COAST); }