]> git.pond.sub.org Git - empserver/commitdiff
torpedo: Print "Starting our attack run" regardless of target
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Feb 2015 14:06:14 +0000 (15:06 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:52 +0000 (08:20 +0100)
Instead of printing it only when the target owned by somebody else.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/torp.c
tests/torpedo/journal.log

index ee215ff089dca8d42942eb2a01cdb94b229ed0c1..49948909bdb2d8e87328087c2ea73f3d21b1af5d 100644 (file)
@@ -145,8 +145,10 @@ torp(void)
            continue;
        }
 
            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);
            anti_torp(sub.shp_uid, ntorping, vshipown);
+       }
        getship(sub.shp_uid, &sub);
        if (sub.shp_own == 0)
            continue;
        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 (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)
     x = 0;
     while (getship(x++, &dd) && sub.shp_effic >= SHIP_MINEFF) {
        if (dd.shp_own == 0)
index b9022167d13573e165549513f5de2460bdc4b70c..4250f973bd2fda58fa595d84be40ef7b9be02127 100644 (file)
     Play#1 input torp 15 16
     Play#1 command torpedo
     Play#1 output Play#1 1 1 ships are eligible to torpedo
     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
     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