From: Markus Armbruster Date: Sun, 15 Feb 2015 14:06:14 +0000 (+0100) Subject: torpedo: Print "Starting our attack run" regardless of target X-Git-Tag: v4.3.33~36 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=88bfa2e6a36dc45160a9669e3c1c2eb5c3561c04 torpedo: Print "Starting our attack run" regardless of target Instead of printing it only when the target owned by somebody else. Signed-off-by: Markus Armbruster --- diff --git a/src/lib/commands/torp.c b/src/lib/commands/torp.c index ee215ff08..49948909b 100644 --- a/src/lib/commands/torp.c +++ b/src/lib/commands/torp.c @@ -145,8 +145,10 @@ torp(void) continue; } - if (!(sub_mcp->m_flags & M_SUB)) + if (!(sub_mcp->m_flags & M_SUB)) { + pr("Starting our attack run...\n"); anti_torp(sub.shp_uid, ntorping, vshipown); + } getship(sub.shp_uid, &sub); if (sub.shp_own == 0) continue; @@ -216,9 +218,6 @@ anti_torp(int f, int ntorping, int vshipown) if (sub.shp_own == vshipown) return; - if ((mchr[(int)sub.shp_type].m_flags & M_SUB) == 0) - pr("Starting our attack run...\n"); - x = 0; while (getship(x++, &dd) && sub.shp_effic >= SHIP_MINEFF) { if (dd.shp_own == 0) diff --git a/tests/torpedo/journal.log b/tests/torpedo/journal.log index b9022167d..4250f973b 100644 --- a/tests/torpedo/journal.log +++ b/tests/torpedo/journal.log @@ -361,6 +361,7 @@ Play#1 input torp 15 16 Play#1 command torpedo Play#1 output Play#1 1 1 ships are eligible to torpedo + Play#1 output Play#1 1 Starting our attack run... Play#1 output Play#1 1 Effective torpedo range is 1.0 Play#1 output Play#1 1 Whooosh... Hitchance = 90% Play#1 output Play#1 1 Missed