From: Markus Armbruster Date: Sun, 11 Jan 2015 12:52:27 +0000 (+0100) Subject: assault attack paradrop: Fix inconsistent support formatting X-Git-Tag: v4.3.33~70 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=7be7ad98aac106758cd03f33a0b5f19bd0edf715 assault attack paradrop: Fix inconsistent support formatting With offensive support but no defensive support, there's no empty line separating the support table from the text that follows. Fix that. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index 6fd0fd80b..a2f0c5c9e 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -29,7 +29,7 @@ * Known contributors to this file: * Ken Stevens, 1995 * Steve McClure, 1996-2000 - * Markus Armbruster, 2006-2014 + * Markus Armbruster, 2006-2015 */ #include @@ -1590,7 +1590,7 @@ get_dsupport(char *outs, struct emp_qelem *list, struct combat *def, if (good) *outs = '\0'; else - sprintf(outs, "defender\t%1.2f\t%1.2f\t%1.2f\t%1.2f\n\n", df, ds, + sprintf(outs, "defender\t%1.2f\t%1.2f\t%1.2f\t%1.2f\n", df, ds, du, dp); if (def->own) { if (good < 0) @@ -1678,6 +1678,7 @@ att_get_support(int combat_mode, int ofort, int oship, int oland, pr("%s", osupports); if (*dsupportp != 1.0) pr("%s", dsupports); + pr("\n"); if (def->own) { wu(0, def->own, "\n\t\tsupport values\n"); wu(0, def->own, "\t\tforts\tships\tunits\tplanes\n"); @@ -1685,6 +1686,7 @@ att_get_support(int combat_mode, int ofort, int oship, int oland, wu(0, def->own, "%s", osupports); if (*dsupportp != 1.0) wu(0, def->own, "%s", dsupports); + wu(0, def->own, "\n"); } } diff --git a/tests/smoke/journal.log b/tests/smoke/journal.log index dfded0487..fd0bea9e4 100644 --- a/tests/smoke/journal.log +++ b/tests/smoke/journal.log @@ -14582,6 +14582,7 @@ Play#1 output Play#1 1 support values Play#1 output Play#1 1 forts ships units planes Play#1 output Play#1 1 attacker 0.00 0.00 0.41 0.26 + Play#1 output Play#1 1 Play#1 output Play#1 1 Final attack strength: 12 Play#1 output Play#1 1 Final defense strength: 187 Play#1 output Play#1 1 Final odds: 6% @@ -15044,6 +15045,7 @@ Play#8 output Play#8 1 support values Play#8 output Play#8 1 forts ships units planes Play#8 output Play#8 1 attacker 0.00 0.00 0.41 0.26 + Play#8 output Play#8 1 Play#8 output Play#8 1 1 (#1) lost 6 troops attacking -6,-4 Play#8 output Play#8 1 We lost 0 troops defending Play#8 output Play#8 1