From ceee05eb7e9ddffe0f3abc92c947ea63010abbc4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 18 Jul 2010 10:37:43 +0200 Subject: [PATCH] Neater plane sonar contact output plane_sona() prints an empty line to make sonar contacts stand out. Move it so the contact is visually "attached" to the right sector, like this: flying over sea at 15,-3 Sonar contact in 15,-3 sub #3 13,-3 flying over sea at 13,-3 Before: flying over sea at 15,-3 Sonar contact in 15,-3 sb submarine (#3) 13,-3 flying over sea at 13,-3 --- src/lib/commands/sona.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/commands/sona.c b/src/lib/commands/sona.c index 1846293a3..f38e8a6c1 100644 --- a/src/lib/commands/sona.c +++ b/src/lib/commands/sona.c @@ -272,7 +272,7 @@ plane_sona(struct emp_qelem *plane_list, int x, int y, continue; add_shiplist(targ->shp_uid, head); if (!found) { - pr("\nSonar contact in %s\n", xyas(x, y, player->cnum)); + pr("Sonar contact in %s\n", xyas(x, y, player->cnum)); found = 1; } if (getrel(getnatp(targ->shp_own), pp->pln_own) < FRIENDLY && @@ -290,6 +290,8 @@ plane_sona(struct emp_qelem *plane_list, int x, int y, xyas(targ->shp_x, targ->shp_y, player->cnum)); } } + if (found) + pr("\n"); } /* -- 2.43.0